IInterractWithBullet









How do I use I Interract With Bullet
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: EnemyBullet.cs Copy
29     void OnTriggerEnter(Collider col)
30     {
31         if (col.tag == "Player")
32         {
33             col.GetComponent().GetDamage();
34         }
35     }
File name: PlayerBullet.cs Copy
29     void OnTriggerEnter(Collider col)
30     {
31         if (col.tag == "Building")
32         {
33             BulletIsOff();
34         }
35         else if (col.tag == "Enemy")
36         {
37             col.GetComponent().GetDamage();
38             BulletIsOff();
39         }
40     }

IInterractWithBullet 104 lượt xem

Gõ tìm kiếm nhanh...