Пример #1
0
        private void DestroyGate(Gate gate, Collision collision)
        {
            PlayerShell shell = collision.gameObject.GetComponent <PlayerShell>();

            if (shell)
            {
                gate.Hit(1);
                shell.Explosion();
            }
        }
Пример #2
0
        private void EnemyTakeDamage(Enemy enemy, Collider collider)
        {
            PlayerShell shell = collider.GetComponent <PlayerShell>();

            if (shell)
            {
                enemy.Hit(1);
                shell.Explosion();
            }
        }