[Execute] //坐骑添加 public void Excute(stAddRideUserCmd_S cmd) { RideMgr.AddRide(cmd.obj, (GameCmd.AddRideAction)cmd.action); table.RideDataBase tabledata = GameTableManager.Instance.GetTableItem <table.RideDataBase>(cmd.obj.base_id); if (tabledata != null) { string txt = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.Talk_System_huodezuoqi, tabledata.name); ChatDataManager.SendToChatSystem(txt); } }
public override void SetGridData(object data) { base.SetGridData(data); if (data is table.RideDataBase) { m_database = (table.RideDataBase)data; if (lableName != null) { lableName.text = m_database.name; } if (lableRate != null) { lableRate.text = DataManager.Manager <RideManager>().GetRideQualityStr(m_database.quality); } if (lableSpeed != null) { table.RideFeedData feeddata = GameTableManager.Instance.GetTableItem <table.RideFeedData>(m_database.rideID, 0); if (feeddata != null) { float value = (feeddata.speed / 100.0f); if (lableSpeed != null) { lableSpeed.text = value.ToString() + "%"; } } } if (icon != null) { UIManager.GetTextureAsyn(m_database.icon , ref iuiIconAtlas, () => { if (null != icon) { icon.mainTexture = null; } }, icon, true); } if (border != null) { string borderIconName = ItemDefine.GetItemBorderIcon(m_database.quality); UIManager.GetAtlasAsyn(borderIconName , ref iuiBorderAtlas, () => { if (null != border) { border.atlas = null; } }, border, true); } if (m_spriteGetTip != null) { m_spriteGetTip.enabled = !DataManager.Manager <RideManager>().ContainRide(m_database.rideID); } } }