コード例 #1
0
        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;
            }
        }
コード例 #2
0
 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 ");
     }
 }
コード例 #3
0
ファイル: FSMElement.cs プロジェクト: zwwl0801/RvoProject
 private static void CallEnter(AbstractParams p)
 {
     if (p.ArgCount > 0)
     {
         FSMElement e = p.ReadObject() as FSMElement;
         if (e != null)
         {
             e.OnEnter();
         }
     }
     else
     {
         LogMgr.LogError("参数异常");
     }
 }
コード例 #4
0
        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());
                    }
                }
            }
        }
コード例 #5
0
 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 ");
     }
 }
コード例 #6
0
        static void DoAddRvo(AbstractParams p)
        {
            Navmesh2Obstacle script = p.ReadObject() as Navmesh2Obstacle;

            script.Add2Rvo();
        }
コード例 #7
0
        static void DoMesh2Obs(AbstractParams p)
        {
            Navmesh2Obstacle script = p.ReadObject() as Navmesh2Obstacle;

            script.Mesh2Obstacle();
        }
コード例 #8
0
        public void Init(AbstractParams InitParams)
        {
#if TOLUA
            attribute = InitParams.ReadObject() as Script_LuaLogicAttribute;
#endif
        }
コード例 #9
0
ファイル: AbstractParams.cs プロジェクト: zwwl0801/RvoProject
        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());
                    }
                }
            }
        }