/// <summary> /// 输出成一个objdata用于客户端创建 /// </summary> /// <returns></returns> public ObjData DumpObjData(ObjRetinue _this, ReasonType reason) { var data = ObjCharacter.GetImpl().DumpObjData(_this, reason); data.Owner = new Uint64Array(); data.Owner.Items.Add(_this.Owner.ObjId); return(data); }
public void Tick(ObjRetinue _this, float delta) { ObjCharacter.GetImpl().Tick(_this, delta); if (0 == _this.mLogicTickCount % 10) { if (_this.Owner == null) { _this.Scene.LeaveScene(_this); return; } var rePos = _this.GetPosition(); var ownerPos = _this.Owner.GetPosition(); var distance = (ownerPos - rePos).LengthSquared(); if (distance > 64) { _this.EnterState(BehaviorState.Idle); _this.SetPosition(ownerPos); _this.SyncCharacterPostion(); } } }