private void TryProcessMove() { if (this.VerifyData()) { var apData = new EvAPModData(); apData.Char = this._data.Char; apData.IsHeal = false; apData.Qty = this._data.Cost; apData.ToDisplay = false; var apEvent = new EvAPMod(apData); apEvent.TryProcess(); var staminaData = new EvStaminaModData(); staminaData.Char = this._data.Char; staminaData.IsHeal = false; staminaData.Qty = this._data.Cost; staminaData.ToDisplay = false; var staminaEvent = new EvStaminaMod(staminaData); staminaEvent.TryProcess(); var exitData = new TileMoveData(); exitData.Callback = this.SetPathInterrupted; exitData.DoAttackOfOpportunity = this._data.DoAttackOfOpportunity; exitData.ParentEvent = this; exitData.Target = this._data.Char; this._data.Source.ProcessExitTile(exitData); if (!this._pathInterrupted) { var script = this._data.Char.GameHandle.AddComponent <SObjectMove>(); var data = new SObjectMoveData(); data.Epsilon = ViewParams.MOVE_EPSILON; data.Object = this._data.Char.GameHandle; data.Source = this._data.Source.Handle.transform.position; data.Speed = ViewParams.MOVE_SPEED; data.Target = this._data.Target.Handle.transform.position; script.Init(data); script.AddCallback(this.MoveDone); } else { this.MoveDone(null); } } }
public void SetData(EvAPModData data) { this._data = data; }
public EvAPMod(EvAPModData d) : base(ECombatEv.APMod) { this._data = d; }