private void OnEvent() { if (EventToUI.sEvent.CompareTo("EU_ADD_DROPITEMTEXT") == 0) { GameObject dropItemObj = (GameObject)EventToUI.GetArg(UIEventArg.Arg1); string text = (string)EventToUI.GetArg(UIEventArg.Arg2); int quality = (int)EventToUI.GetArg(UIEventArg.Arg3); if (-1 == quality) { return; } Create(dropItemObj, text, quality); } else if (EventToUI.sEvent.CompareTo("EU_REMOVE_DROPITEMTEXT") == 0) { GameObject dropItemObj = (GameObject)EventToUI.GetArg(UIEventArg.Arg1); for (int i = 0; i < mDropTextList.Count; ++i) { if (mDropTextList[i].dropItemObj == dropItemObj) { RecycleDropText(mDropTextList[i]); } } } else if (EventToUI.sEvent.CompareTo("EU_SHOW_DROPFLY") == 0) { string icon = (string)EventToUI.GetArg(UIEventArg.Arg1); Vector3 from = (Vector3)EventToUI.GetArg(UIEventArg.Arg2); Vector3 to = (Vector3)EventToUI.GetArg(UIEventArg.Arg3); string itemName = (string)EventToUI.GetArg(UIEventArg.Arg4); int quality = (int)EventToUI.GetArg(UIEventArg.Arg5); ShowDropFlyItem(Time.realtimeSinceStartup, icon, from, to, itemName, quality); } else if (EventToUI.sEvent.CompareTo("EU_SHOW_DROPGOLDGFLY") == 0) { int count = (int)EventToUI.GetArg(UIEventArg.Arg1); Vector3 pos = (Vector3)EventToUI.GetArg(UIEventArg.Arg2); ShowDropGoldFlyItem(count, pos); } else if (EventToUI.sEvent.CompareTo("EU_SHOW_DROPFLYTIP") == 0) { FlyTipInfo info = new FlyTipInfo(); info.name = (string)EventToUI.GetArg(UIEventArg.Arg1); info.quality = (int)EventToUI.GetArg(UIEventArg.Arg2); mProcessFlyTips.Enqueue(info); } }
void OnEvent() { if (EventToUI.sEvent.CompareTo("EU_DEBUGLOGOUT") == 0) { LOG_TYPE type = (LOG_TYPE)EventToUI.GetArg(UIEventArg.Arg1); string strMsg = (string)EventToUI.GetArg(UIEventArg.Arg2); LogToBuff(DEBUG_TYPE.DEBUG_LOG, type, strMsg); } else if (EventToUI.sEvent.CompareTo("EU_GMOP_OK") == 0) { outPutAppend("gm操作成功!"); } }