public void TryMoveToPos(float x, float z) { MoveToPos msg = new MoveToPos(); msg.Pos = new PBVector2(); msg.Pos.X = x; msg.Pos.Y = z; App.my.gameNetwork.Send(ProtoId.PidMoveToPos, msg); }
/// <summary> /// move o registro para o início (BOF) ou final (EOF) /// </summary> /// <param name="moveTo">posição</param> /// <returns>true se moveu o registro</returns> public virtual bool MoveTo(MoveToPos moveToPos) { int pos = -1; if (moveToPos == MoveToPos.EOF) { pos = RecordCount + 1; } return(MoveTo(pos)); }
public void SendMoveToPos(Vector3 targetPoint, float stop_distance) { MoveToPos data = new MoveToPos { unitId = this.self.unique_id, pos = new SVector3 { x = targetPoint.x, y = targetPoint.y, z = targetPoint.z } }; if (this.self.isPlayer || (this.self.MirrorState && this.self.ParentUnit.isPlayer)) { PvpEvent.SendMoveToPos(SerializeHelper.Serialize <MoveToPos>(data)); } this.lastSendTartgetPoint = targetPoint; }