Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (player.getState() == Transitions.ProcessState.enemyTurn)
     {
         EnemyTurn();
     }
 }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        switch (player.getState())
        {
        case Transitions.ProcessState.playerTurn:
            ScrollThroughOptions();
            CheckForSubOption();
            break;

        case Transitions.ProcessState.attackSub:
            button0 = attack.gameObject.transform.Find("Attack 1").GetComponent <Button>();
            button1 = attack.gameObject.transform.Find("Attack 2").GetComponent <Button>();
            button2 = attack.gameObject.transform.Find("Attack 3").GetComponent <Button>();
            button3 = attack.gameObject.transform.Find("Attack 4").GetComponent <Button>();
            ScrollThroughOptions();                 //should make this able to scroll up and down with more than 4 items
            CheckForAction("attack");
            break;

        case Transitions.ProcessState.skillSub:
            button0 = skills.gameObject.transform.Find("Skill 1").GetComponent <Button>();
            button1 = skills.gameObject.transform.Find("Skill 2").GetComponent <Button>();
            button2 = skills.gameObject.transform.Find("Skill 3").GetComponent <Button>();
            button3 = skills.gameObject.transform.Find("Skill 4").GetComponent <Button>();
            ScrollThroughOptions();
            CheckForAction("skill");
            break;

        case Transitions.ProcessState.itemSub:
            button0 = items.gameObject.transform.Find("Item 1").GetComponent <Button>();
            button1 = items.gameObject.transform.Find("Item 2").GetComponent <Button>();
            button2 = items.gameObject.transform.Find("Item 3").GetComponent <Button>();
            button3 = items.gameObject.transform.Find("Item 4").GetComponent <Button>();
            ScrollThroughOptions();
            CheckForAction("item");
            break;

        default:
            break;
        }
    }
Exemple #3
0
    // Update is called once per frame
    void Update()
    {
        switch (player.getState())
        {
        //need a way to differentiate when this state has been called by
        //player action or enemy action
        case Transitions.ProcessState.dialogue:
            TriggerDialogue();
            if (turn == 0)
            {
                player.switchState(Transitions.Command.waitForEnemy);
            }
            else if (turn == 1)
            {
                player.switchState(Transitions.Command.waitForPlayer);
            }
            break;

        default:
            break;
        }
    }