public AbilityMoveData(AbilityResultInfo _data, GameObject _user) { moveType = _data.NeedMove ? SelfShiftType.DIRECTION : SelfShiftType.NO; isForce = true; user = _user; AbilityDestPos = ActorMoveFSM.LineCast(_data.curDestPos, true); direction = _data.Dir; rushHoldTime = _data.curMoveTime; if (_data.target != null) { target = _data.target.gameObject; } faceToPos = _data.UserActor.transform.position; }
public AbilityMoveData(AbilityInstance _data, GameObject _user) { dataInfo = _data; if (dataInfo.NeedPrepare) { startCaculatTime = Time.time; prepareDuration = dataInfo.PrepareDuration; } moveType = _data.PerformanceRef.selfShiftType; user = _user; if (_data.TargetActor != null) { target = _data.TargetActor.gameObject; } AbilityDestPos = ActorMoveFSM.LineCast(new Vector3(_data.endPosX, _data.endPosY, _data.endPosZ), true); direction = Quaternion.Euler(0.0f, _data.DirY, 0.0f) * new Vector3(0, 0, 1); rushValue = _data.RushValue; rushHoldTime = _data.RushHoldTime; InitDirection(); }