コード例 #1
0
ファイル: Detector.cs プロジェクト: mosman-team/unity-proj
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.GetComponent <Attacker>())
     {
         healthText.decreaseHealth();
         Destroy(collision.gameObject, 1f);
     }
 }