コード例 #1
0
    public void Dance(GameManager.Result result)
    {
        int randDance = Random.Range(1, 4);

        danceStyle = randDance;
        if (LevelRthymController.instance.getLevelHolder() >= 10)
        {
            danceStyle = 5;
        }
        this.GetComponent <Animator>().Rebind();

        if (result == GameManager.Result.Miss)
        {
            return;
        }
        //Dance based from score;
        //20 - BoringDance
        //40 - HipHopDancing1
        //60 - HipHopDancing2
        //80 - BreakdanceFootwork
        //100 - GangnameStyle
        state = (int)Animation.Dance;
        // if(score > 80)
        //     danceStyle = 4;
        // else if(score > 60)
        //     danceStyle = 3;
        // else if(score > 40)
        //     danceStyle = 2;
        // else if(score > 20)
        //     danceStyle = 1;
        // else
        //     danceStyle = 0;
        SetAnimation(state);
    }
コード例 #2
0
    public void ControlAIDance(int index, GameManager.Result result)
    {
        if (result == GameManager.Result.Miss)
        {
            return;
        }

        GameObject controlAI;

        if (index == 1)
        {
            controlAI = AIPlayer1.gameObject;
        }
        else if (index == 2)
        {
            controlAI = AIPlayer2.gameObject;
        }
        else
        {
            return;
        }

        controlAI.GetComponent <CharacterController>().AIDance();
    }
コード例 #3
0
 public Player(string name)
 {
     this.Name = name;
     Result    = GameManager.Result.None;
 }