/// <summary> /// 加载镖车, 由于镖车有血量和阵营,并且可以被攻击,类似同阵营玩家,先用于玩家代替!! /// </summary> public GameObject LoadBiaoChe(MsgData_sSceneObjectEnterBiaoChe cheStruct) { ActorObj ao = CoreEntry.gActorMgr.GetPlayerActorByServerID(cheStruct.Guid); if (null != ao) { return(ao.gameObject); } LuaTable row = RawLuaConfig.Instance.GetRowData("t_kuafubiaoche", cheStruct.DartID); if (null == row) { return(null); } int modelid = row.Get <int>("model"); Vector3 position = CommonTools.ServerPosToClient(cheStruct.PosX, cheStruct.PosY); Vector3 eulerAngle = CommonTools.ServerDirToClient(cheStruct.Dir); Vector3 scale = new Vector3(1, 1, 1); GameObject obj = LoadOtherPlayer(modelid); obj.transform.position = position; obj.transform.eulerAngles = eulerAngle; obj.transform.localScale = scale; OtherPlayer BiaoChe = obj.AddComponent <OtherPlayer>(); BiaoChe.Faction = cheStruct.Camp; if (BiaoChe.mBaseAttr == null) { BiaoChe.mBaseAttr = new BaseAttr(); } BiaoChe.mBaseAttr.MaxHP = cheStruct.HP; BiaoChe.mBaseAttr.CurHP = cheStruct.HP; BiaoChe.mBaseAttr.Level = cheStruct.Level; BiaoChe.mBaseAttr.Name = CommonTools.BytesToString(cheStruct.LeaderName) + "的镖车"; BiaoChe.Init(modelid, modelid, cheStruct.Guid); BiaoChe.mActorType = ActorType.AT_MECHANICS; BiaoChe.mBaseAttr.Speed = CommonTools.ServerValueToClient(cheStruct.Speed); BiaoChe.SetSpeed(BiaoChe.mBaseAttr.Speed); BiaoChe.ServerID = cheStruct.Guid; CoreEntry.gActorMgr.AddActorObj(BiaoChe); return(obj); }
public string GetTitle() { return(CommonTools.BytesToString(mailtitle)); }
public MailItemVo[] items = new MailItemVo[8]; // 邮件列表 public string GetContnet() { return(CommonTools.BytesToString(contnet)); }