Example #1
0
    public void BtnLT()
    {
        menuState = buttons.GetMenuState();
        switch (menuState)
        {
        case ButtonStates.DEFAULT:
            buttons.SetMenu(ButtonStates.ATTACK);
            break;

        case ButtonStates.ATTACK:
            buttons.SetEvtBar(EvtBarStates.DIALOGUE);
            player.Attack(AttackTypes.PUNCH);
            break;

        case ButtonStates.ITEM:
            player.Heal();
            break;

        case ButtonStates.DEV_TOOLS:
            dataManager.Save("inventory");
            break;
        }
    }
Example #2
0
    private void Update()
    {
        if (dialogue == null)
        {
            dialogue = dataManager.GetDialogue();
        }

        waitToAttack = dialogue.GetTyping();

        if (Input.anyKeyDown && !waitToAttack && takeTurn)
        {
            waitToAttack = false;
            takeTurn     = false;
            buttons.SetEvtBar(EvtBarStates.BUTTONS);
            buttons.SetMenu(ButtonStates.DEFAULT);
        }

        if (Input.anyKeyDown && !waitToAttack && returnToItem)
        {
            returnToItem = false;
            buttons.SetEvtBar(EvtBarStates.BUTTONS);
            buttons.SetMenu(ButtonStates.ITEM);
        }
    }
Example #3
0
 public void SkipTurn()
 {
     buttons.SetEvtBar(EvtBarStates.DIALOGUE);
     dialogue.SetText(("You skipped your turn!").ToUpper());
     EnemyTurn();
 }