コード例 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.TryGetComponent <Player>(out Player player))
     {
         Debug.Log("Heart someone");
         PlayerProjectilePool.ReturnProjectile(gameObject);
     }
     StopMoving();
     anim.SetBool("PlayerProjectileExplosion", true);
 }
コード例 #2
0
 private void OnBecameInvisible()
 {
     PlayerProjectilePool.ReturnProjectile(gameObject);
 }