Exemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        // Hit Enemy
        if (other.gameObject.tag == "NPC")
        {
            enemyHealth.DecreaseCurrentHealth(1);
            if (GameManager.Instance.GSV.BattleTutorialStage == 4)
            {
                BattleManager.Instance.WrongMove();
            }
            Destroy(gameObject);
        }

        // Cancelled Attacak
        if (other.gameObject.tag == "Player Attack")
        {
            Destroy(other.gameObject);
            Destroy(gameObject);
        }
    }