public void Init(AbstractParams InitParams) { object passObject = InitParams.ReadObject(); if (passObject != null && passObject is Delegate) { ScriptFunc = passObject as Delegate; this.RetTp = InitParams.ReadObject() as Type; this.methodname = InitParams.ReadString(); } else if (passObject != null) { weakref = new WeakReference(passObject); method = InitParams.ReadObject() as MethodInfo; } }
private static void staticRelease(AbstractParams p) { if (p != null) { GameUI ui = p.ReadObject() as GameUI; ui.CallRelease(); } else { LogMgr.LogError("gameui staticRelease params is Null "); } }
private static void CallEnter(AbstractParams p) { if (p.ArgCount > 0) { FSMElement e = p.ReadObject() as FSMElement; if (e != null) { e.OnEnter(); } } else { LogMgr.LogError("参数异常"); } }
private void _LuaScriptParmsCall(AbstractParams ScriptParms) { if (ScriptParms != null) { ScriptParms.ResetReadIndex(); for (int i = 0; i < ScriptParms.ArgCount; ++i) { int tp = ScriptParms.GetArgIndexType(i); if (tp == (int)ParamType.INT) { this.luafunc.Push(ScriptParms.ReadInt()); } else if (tp == (int)ParamType.BOOL) { this.luafunc.Push(ScriptParms.ReadBool()); } else if (tp == (int)ParamType.SHORT) { this.luafunc.Push(ScriptParms.ReadShort()); } else if (tp == (int)ParamType.FLOAT) { this.luafunc.Push(ScriptParms.ReadFloat()); } else if (tp == (int)ParamType.DOUBLE) { this.luafunc.Push(ScriptParms.ReadDouble()); } else if (tp == (int)ParamType.STRING) { this.luafunc.Push(ScriptParms.ReadString()); } else if (tp == (int)ParamType.OBJECT) { this.luafunc.Push(ScriptParms.ReadObject()); } else if (tp == (int)ParamType.UNITYOBJECT) { this.luafunc.Push(ScriptParms.ReadUnityObject()); } else if (tp == (int)ParamType.LONG) { this.luafunc.Push(ScriptParms.ReadLong()); } } } }
private static void staticEnter(AbstractParams p) { if (p != null) { System.Object o = p.ReadObject(); GameUI ui = o as GameUI; if (ui == null) { LogMgr.LogError("really??"); } ui.CallEnter(p); } else { LogMgr.LogError("gameui staticEnter params is Null "); } }
static void DoAddRvo(AbstractParams p) { Navmesh2Obstacle script = p.ReadObject() as Navmesh2Obstacle; script.Add2Rvo(); }
static void DoMesh2Obs(AbstractParams p) { Navmesh2Obstacle script = p.ReadObject() as Navmesh2Obstacle; script.Mesh2Obstacle(); }
public void Init(AbstractParams InitParams) { #if TOLUA attribute = InitParams.ReadObject() as Script_LuaLogicAttribute; #endif }
public void Push(AbstractParams args) { if (args != null) { if (args == this) { LogMgr.Log("参数对象相同 无法添加"); return; } int cnt = args.ArgCount; if (this._LimitMax != -1 && cnt + ArgCount > this._LimitMax) { this.throwUseGener(); return; } if (this._OriginArgCount > 0) { this._OriginArgCount += cnt; } for (int i = 0; i < cnt; ++i) { int tp = args.GetArgIndexType(i); if (tp == (int)ParamType.INT) { this.WriteInt(args.ReadInt()); } else if (tp == (int)ParamType.SHORT) { this.WriteShort(args.ReadShort()); } else if (tp == (int)ParamType.BOOL) { this.WriteBool(args.ReadBool()); } else if (tp == (int)ParamType.FLOAT) { this.WriteFloat(args.ReadFloat()); } else if (tp == (int)ParamType.DOUBLE) { this.WriteDouble(args.ReadDouble()); } else if (tp == (int)ParamType.LONG) { this.WriteLong(args.ReadLong()); } else if (tp == (int)ParamType.STRING) { this.WriteString(args.ReadString()); } else if (tp == (int)ParamType.VETOR3) { this.WriteVector3(args.ReadVector3()); } else if (tp == (int)ParamType.OBJECT) { this.WriteObject(args.ReadObject()); } else if (tp == (int)ParamType.UNITYOBJECT) { this.WriteUnityObject(args.ReadUnityObject()); } } } }