Пример #1
0
    void Death()
    {
        //If they are on row 1
        if (gameObject.transform.position.y > 1.5)
        {
            grid.row1EnemyCount--;
        }
        //If they are on row 2
        else if (gameObject.transform.position.y < 1.5 && gameObject.transform.position.y > -1.5)
        {
            grid.row2EnemyCount--;
        }
        //if they are on row 3
        else if (gameObject.transform.position.y < -1.5)
        {
            grid.row3EnemyCount--;
        }

        if (gameObject.name == "EnemyEasy(Clone)")
        {
            gm.IncreasePoints(50);
        }
        if (gameObject.name == "EnemyMedium(Clone)")
        {
            gm.IncreasePoints(100);
        }
        if (gameObject.name == "EnemyHard(Clone)")
        {
            gm.IncreasePoints(200);
        }
        anim.SetBool("Death", true);
        ass.clip = FindObjectOfType <Game_Manager>().audios[6];
        ass.Play();


        Invoke("Dead", 0.7f);
    }