Esempio n. 1
0
    public int Update(PlayStateContext context, out bool willSpendTime)
    {
        willSpendTime = false;

        RangeSelectStateContext ctxt = context as RangeSelectStateContext;

        if (ctxt.Input.MoveDir != MoveDirection.None)
        {
            ctxt.RefreshTargetView(ctxt.Input.MoveDir);
        }

        if (ctxt.Input.ActionConfirm || ctxt.Input.RangeStart)
        {
            ctxt.ClearTargetView();
            willSpendTime = ctxt.EntityController.Player.BattleTrait.TryAttackCoords(ctxt.Target);
            return(GameController.PlayStates.Action);
        }

        if (ctxt.Input.ActionCancel)
        {
            ctxt.ClearTargetView();
            return(GameController.PlayStates.Action);
        }

        return(GameController.PlayStates.RangePrepare);
    }
Esempio n. 2
0
    public void Exit(PlayStateContext context)
    {
        RangeSelectStateContext rangeContext = ((RangeSelectStateContext)context);

        rangeContext.ClearTargetView();
    }
Esempio n. 3
0
    public void Enter(PlayStateContext context)
    {
        RangeSelectStateContext rangeContext = ((RangeSelectStateContext)context);

        rangeContext.SetupTargetView();
    }