Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        switch (other.tag)
        {
        case "Boundary":
            return;

        case "Shot":
            Destroy(other.gameObject);
            gameController.addScore(gameObject.tag);
            DecrementHealth();
            StartCoroutine(animator.BlinkAllAnimation(gameObject, gameController.getPrimaryMaterial(), gameController.getSecondaryMaterial()));
            return;

        case "PlayerShip":
            if (!isBoss())
            {
                DecrementHealth();
            }
            gameController.decrementLife();
            return;

        default:
            return;
        }
    }