コード例 #1
0
    private void RemoveLastAbility()
    {
        if (!Gm.combatManager.IsAbilityQueueEmpty())
        {
            RemoveAbilityItemLock();
            Gm.combatManager.RemoveLastQueuedAbility();

            Gm.hudManager.commandInterface.ShowCompatibleCommands(Gm.combatManager, CurrentActor);

            if (Gm.combatManager.IsAbilityQueueEmpty())
            {
                Gm.hudManager.inputInfoInterface.ShowCommands(new Dictionary <string, string>
                {
                    { "WASD", "Browse commands" },
                    { "SPACE", "Enqueue command" },
                    { "E", "Close panel" }
                });
            }
        }
        else
        {
            EventManager <List <AbilityDetails> > .Invoke(EventType.OnAbilityQueueChanged, null);

            Gm.SwitchState(typeof(State_PlayerTurn_Move));
        }
    }
コード例 #2
0
 private void AdvanceToPerformanceState()
 {
     if (!Gm.combatManager.IsAbilityQueueEmpty())
     {
         // Gm.combatManager.ConfirmAbilityQueue();
         Gm.SwitchState(typeof(State_PlayerTurn_Performance));
     }
 }
コード例 #3
0
    private bool TryToAttackTarget(Combatant target)
    {
        if (!_hasAttacked && CurrentActor.HasAbilityThatCanReach(CurrentActor.point, target.point))
        {
            _hasAttacked = true;
            Gm.combatManager.EnqueueCommand(new AbilityDetails(CurrentActor.GetCurrentlyPerformableAbilities()[0], CurrentActor, new List <GridObject> {
                target
            }));
            Gm.SwitchState(typeof(State_EnemyTurn_Performance), 0.5f);

            return(true);
        }

        return(false);
    }
コード例 #4
0
 private void SwitchToAbilitySelectionState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }
コード例 #5
0
 private void SwitchToInventoryState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_Inventory));
 }
コード例 #6
0
 private void SwitchToMoveState()
 {
     // Gm.combatManager.ClearAbilityQueue();
     Gm.SwitchState(typeof(State_PlayerTurn_Move));
 }
コード例 #7
0
 private void ReturnToAbilityState()
 {
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }
コード例 #8
0
 private void ConfirmTarget()
 {
     Gm.combatManager.EnqueueCommand(new AbilityDetails(_currentCommand, CurrentActor, DetermineTargets()));
     Gm.SwitchState(typeof(State_PlayerTurn_PickAbility));
 }