static public void traceLog(string msg, int level) { IntPtrHelper helper = new IntPtrHelper(); IntPtr strParam_Ptr = helper.Str2Ptr(msg); _traceLog(strParam_Ptr, new IntPtr(level)); }
static public void onEntityEvent(ENTITY_ID entityID, int eventID, int nParam, string strParam, IntPtr ptrParam, int len) { IntPtrHelper helper = new IntPtrHelper(); IntPtr strParam_Ptr = helper.Str2Ptr(strParam); _onEntityEvent(new IntPtr(entityID), new IntPtr(eventID), new IntPtr(nParam), strParam_Ptr, ptrParam, len); }
static public void onGameViewEvent(int eventID, int nParam, string strParam, IntPtr ptrParam, int len) { IntPtrHelper helper = new IntPtrHelper(); IntPtr strParam_Ptr = helper.Str2Ptr(strParam); _onGameViewEvent(new IntPtr(eventID), new IntPtr(nParam), strParam_Ptr, ptrParam, len); }
public void onOkButtonClick() { String strParam = strFuncName + "("; for (int i = 1; i < nStrParamCount + 1; i++) { String strTemp = this.gameObject.transform.FindChild("SecondPage").gameObject.transform.FindChild("TextContent_" + i.ToString()).gameObject.GetComponent <InputField>().text; if (strTemp == "") { return; } if (i == nStrParamCount) { strParam = strParam + strTemp; } else { strParam = strParam + strTemp + ","; } } strParam += ")"; IntPtrHelper helper = new IntPtrHelper(); IntPtr strParam_ptr = helper.Str2Ptr(strParam); int eventID = (int)EntityLogicDef.ENTITY_CMD_DRAGONBALL; GameLogicAPI.onEntityEvent(EntityFactory.MainHeroID, eventID, 0, strParam, strParam_ptr, GameLogicAPI.getStringLen(strParam_ptr)); }