Exemplo n.º 1
0
 public static void CancelAttack()
 {
     SetState(State.PickAction);
     CursorController.HideAttackCursors();
     CursorController.HideConfirmAttackCursors();
     Menu.Refresh();
 }
Exemplo n.º 2
0
 public static void FinishAction()
 {
     // CursorController.ShowMoveCells();
     CursorController.ResetPath();
     CursorController.HideAttackCursors();
     CursorController.HideConfirmAttackCursors();
     instance.Whatever();
 }
Exemplo n.º 3
0
 public static void RefreshPlayerView()
 {
     CursorController.HideAttackCursors();
     CursorController.HideConfirmAttackCursors();
     CursorController.ShowMoveCells();
     CursorController.RefreshAlarmCursors();
     SetState(State.PickAction);
     Menu.Refresh();
     ActionInformation.Hide();
     DeathInformation.Refresh();
     MenuCamera.Refresh();
 }
Exemplo n.º 4
0
    public static void ConfirmAction(Cursor cursor)
    {
        UnitAction action = Unit.Subject().Actions()[selectedActionIndex].GetComponent <UnitAction>();

        if (action.actionType() == UnitAction.ActionType.Ranged)
        {
            foreach (Buff buff in Unit.Subject().Buffs())
            {
                if (!buff.CanUseRanged())
                {
                    Alert.Show("Cannot use ranged abilities");
                    return;
                }
            }
        }
        if (action.actionType() == UnitAction.ActionType.Support)
        {
            foreach (Buff buff in Unit.Subject().Buffs())
            {
                if (!buff.CanUseSupport())
                {
                    Alert.Show("Cannot use support abilities");
                    return;
                }
            }
        }
        if (action.actionType() == UnitAction.ActionType.Magic)
        {
            foreach (Buff buff in Unit.Subject().Buffs())
            {
                if (!buff.CanUseMagic())
                {
                    Alert.Show("Cannot use magic abilities");
                    return;
                }
            }
        }
        SetState(State.ConfirmTarget);
        CursorController.HideConfirmAttackCursors();
        CursorController.ShowConfirmActionCursors(cursor);
        CursorController.ShowActionRangeCursors(cursor, selectedActionIndex);
    }