예제 #1
0
    void StartBattleFromLoad()
    {
        InitUI();


        foreach (ActorData d in party.partyCharacter)
        {
            if (d.selected)
            {
                spawner.GenerateActor(d, this, false);
            }
        }

        turnManager.InitTurnManager(this);
        turnManager.CalculateFastest();

        inputFSM.SwitchState(new UsersTurnState(this));
    }
예제 #2
0
    void AttackBasedInputs()
    {
        if (currentActor.CanAttack())
        {
            if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey1))
            {
                SkillHotBarUsed(0);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey2))
            {
                SkillHotBarUsed(1);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey3))
            {
                SkillHotBarUsed(2);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey4))
            {
                SkillHotBarUsed(3);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey5))
            {
                SkillHotBarUsed(4);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey6))
            {
                SkillHotBarUsed(5);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey7))
            {
                SkillHotBarUsed(6);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey8))
            {
                SkillHotBarUsed(7);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey9))
            {
                SkillHotBarUsed(8);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.SkillKey10))
            {
                SkillHotBarUsed(9);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.InventoryKey1))
            {
                UseInventory(0);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.InventoryKey2))
            {
                UseInventory(1);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.InventoryKey3))
            {
                UseInventory(2);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.InventoryKey4))
            {
                UseInventory(3);
            }
            else if (inputHandler.IsKeyPressed(KeyBindingNames.InventoryKey5))
            {
                UseInventory(4);
            }
        }

        if (currentActor.CanMove())
        {
            if (inputHandler.IsKeyPressed(KeyBindingNames.MovementHotKey))
            {
                inputFSM.SwitchState(new MoveSelectionState(boardManager, currentActor));
            }
        }

        if (inputHandler.IsKeyPressed(KeyBindingNames.WaitHotKey))
        {
            currentActor.Wait();
            turnManager.CalculateFastest();
        }
    }