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); }
public void Exit(PlayStateContext context) { RangeSelectStateContext rangeContext = ((RangeSelectStateContext)context); rangeContext.ClearTargetView(); }
public void Enter(PlayStateContext context) { RangeSelectStateContext rangeContext = ((RangeSelectStateContext)context); rangeContext.SetupTargetView(); }