Beispiel #1
0
 public void Load(DBBaseTDMove data)
 {
     CurMovePoint       = data.CurMovePoint;
     MoveTarget_Unit    = GetEntity(data.MoveTarget);
     FaceTarget         = GetEntity(data.FaceTarget);
     MoveTarget_IsValid = data.IsValidMoveTarget;
     MoveTarget_State   = (TState)(object)data.MoveTargetState;
     StateMachine.SetCurState((TState)(object)data.CurMoveState, false);
     SetMoveTargetPosPreview(null, null, data.MoveTargetPosPreview.V3);
     SetMoveTargetPosReal(data.MoveTargetPosReal.V3);
 }
Beispiel #2
0
        public DBBaseTDMove GetDBData()
        {
            DBBaseTDMove dbData = new DBBaseTDMove();

            dbData.CurMovePoint      = CurMovePoint;
            dbData.MoveTarget        = !MoveTarget_Unit.IsInv() ? MoveTarget_Unit.ID : Const.INT_Inv;
            dbData.FaceTarget        = !FaceTarget.IsInv() ? FaceTarget.ID : Const.INT_Inv;
            dbData.IsValidMoveTarget = MoveTarget_IsValid;
            dbData.MoveTargetState   = Enum <TState> .Int(MoveTarget_State);

            dbData.MoveTargetPosPreview = MoveTarget_PosPreview.ToVec3();
            dbData.MoveTargetPosReal    = MoveTarget_PosReal.ToVec3();
            dbData.CurMoveState         = Enum <TState> .Int(StateMachine.CurState);

            return(dbData);
        }