示例#1
0
        public override void SetAgent(Agent agent, string classType)
        {
            BTAgent = agent;
#if XLUA
            if (NewFunc == null)
            {
                NewFunc = XLuaEngine.Get <Func <string, XAgentLuaProxy, ILuaAgentProxy> >("XLuaBehaviorManager.NewLuaAgentProxy");
            }

            if (NewFunc != null)
            {
                LuaAgentProxy = NewFunc(classType, this);
            }
#endif
            this.Events = OnGetEvents();
        }
示例#2
0
        public override void SetNode(BaseNode baseNode)
        {
            this.Node          = baseNode;
            this.NodeProxyInfo = baseNode.NodeInfo;
#if XLUA
            if (NewFunc == null)
            {
                NewFunc = XLuaEngine.Get <Func <string, NodeLuaProxy, ILuaNodeProxy> >("XLuaBehaviorManager.NewLuaNodeProxy");
            }

            if (NewFunc != null)
            {
                LuaNodeProxy = NewFunc(baseNode.NodeInfo.ClassType, this);
            }
#endif
            this.Events = OnGetEvents();
        }