Пример #1
0
    public void animationChoice(chooseAnimations anim)
    {
        switch (anim)
        {
        case chooseAnimations.Idle:
            this.gameObject.GetComponent <Animation>().Play("Idle");
            break;

        case chooseAnimations.Jam:
            this.gameObject.GetComponent <Animation>().Play("Jam");
            break;

        case chooseAnimations.Shoot:
            this.gameObject.GetComponent <Animation>().Play("Shoot");
            break;

        case chooseAnimations.Dead:
            if (playerNumber == 1)
            {
                this.gameObject.GetComponent <Animation>().Play("Dead");
            }
            else
            {
                this.gameObject.GetComponent <Animation>().Play("Dead(Mirror)");
            }
            break;
        }
    }
    public void animationChoice(chooseAnimations anim)
    {
        switch (anim)
        {
        case chooseAnimations.Idle:
            this.gameObject.GetComponent <Animation> ().Play("Idle");
            break;

        case chooseAnimations.Jam:
            this.gameObject.GetComponent <Animation> ().Play("Jam");
            break;

        case chooseAnimations.Shoot:
            this.gameObject.GetComponent <Animation> ().Play("Shoot");
            break;

        case chooseAnimations.Dead:
            this.gameObject.GetComponent <Animation> ().Play("Dead");
            break;
        }
    }