Exemplo n.º 1
0
        static void CleanPlayer()
        {
            Loger.Log("CleanupPlayer");

            firstAgent  = null;
            secondAgent = null;
            thirdAgent  = null;
        }
Exemplo n.º 2
0
        static bool InitPlayer()
        {
            Console.WriteLine("InitPlayer");

            g_SecondAgent = new SecondAgent();

            bool bRet = g_SecondAgent.btload("SecondBT");

            Debug.Assert(bRet);

            g_SecondAgent.btsetcurrent("SecondBT");

            return(bRet);
        }
Exemplo n.º 3
0
    private bool InitPlayer()
    {
        behaviac.Debug.LogWarning("InitPlayer");
        g_FirstAgent = new GameObject("FirstAgent").AddComponent <FirstAgent>();
        var bRet = g_FirstAgent.btload("InstanceBT");

        // if (bRet)
        // {
        g_FirstAgent.btsetcurrent("InstanceBT");
        g_SecondAgent = new GameObject("SecondAgent").AddComponent <SecondAgent>();
        g_FirstAgent._set_pInstance(g_SecondAgent);

        // }
        g_ThirdAgent = new GameObject("ThirdAgent").AddComponent <SecondAgent>();
        behaviac.Agent.BindInstance(g_ThirdAgent, "SecondAgentInstance");
        return(bRet);
    }
Exemplo n.º 4
0
        static bool InitPlayer()
        {
            Console.WriteLine("InitPlayer");

            g_FirstAgent = new FirstAgent();
            bool bRet = g_FirstAgent.btload("InstanceBT");

            Debug.Assert(bRet);
            g_FirstAgent.btsetcurrent("InstanceBT");

            g_SecondAgent = new SecondAgent();
            g_FirstAgent._set_pInstance(g_SecondAgent);

            g_ThirdAgent = new SecondAgent();
            behaviac.Agent.BindInstance(g_ThirdAgent, "SecondAgentInstance");

            return(bRet);
        }
Exemplo n.º 5
0
        static bool InitPlayer()
        {
            Console.WriteLine("InitPlayer");

            // 创建g_FirstAgent,并加载行为树“InstanceBT”
            g_FirstAgent = new FirstAgent();
            bool bRet = g_FirstAgent.btload(strBehaviorTree);

            //Debug.Assert(bRet);
            g_FirstAgent.btsetcurrent(strBehaviorTree);

            // 创建g_SecondAgent,并将该实例赋给g_FirstAgent的成员pInstance
            g_SecondAgent = new SecondAgent();
            g_FirstAgent._set_pInstance(g_SecondAgent);

            // 创建g_ThirdAgent,并将"SecondAgentInstance"绑定给该实例
            g_ThirdAgent = new SecondAgent();
            behaviac.Agent.BindInstance(g_ThirdAgent, "SecondAgentInstance");

            return(bRet);
        }
Exemplo n.º 6
0
        static bool InitPlayer(string btname)
        {
            Loger.LogFormat("InitPlayer : {0}", btname);

            // 创建firstAgent,并加载行为树“InstanceBT”
            firstAgent = new FirstAgent();
            bool ret = firstAgent.btload(btname);

            Debug.Assert(ret);
            firstAgent.btsetcurrent(btname);

            // 创建secondAgent,并将该实例赋给firstAgent的成员pInstance
            secondAgent = new SecondAgent();
            firstAgent._set_pInstance(secondAgent);

            // 创建thirdAgent,并将"SecondAgentInstance"绑定给该实例
            thirdAgent = new SecondAgent();
            behaviac.Agent.BindInstance(thirdAgent, "SecondAgentInstance");


            return(ret);
        }
Exemplo n.º 7
0
        public override bool Load()
        {
            AgentMeta.TotalSignature = 3139633416;

            AgentMeta meta;

            // behaviac.Agent
            meta = new AgentMeta(24743406);
            AgentMeta._AgentMetas_[2436498804] = meta;
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            // FirstAgent
            meta = new AgentMeta(136495355);
            AgentMeta._AgentMetas_[1778122110] = meta;
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); }));
            meta.RegisterMethod(1505908390, new CAgentMethodVoid(delegate(Agent self) { ((FirstAgent)self).SayHello(); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            // SecondAgent
            meta = new AgentMeta(3772742788);
            AgentMeta._AgentMetas_[2432194202] = meta;
            meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((SecondAgent)self)._set_p1(value); }, delegate(Agent self) { return(((SecondAgent)self)._get_p1()); }));
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { SecondAgent.LogMessage(param0); }));
            meta.RegisterMethod(1759647744, new CAgentMethodVoid <string>(delegate(Agent self, string value) { ((SecondAgent)self).m1(value); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            AgentMeta.Register <behaviac.Agent>("behaviac.Agent");
            AgentMeta.Register <FirstAgent>("FirstAgent");
            AgentMeta.Register <SecondAgent>("SecondAgent");
            return(true);
        }
Exemplo n.º 8
0
        static void CleanupPlayer()
        {
            Console.WriteLine("CleanupPlayer");

            g_SecondAgent = null;
        }
Exemplo n.º 9
0
 public void _set_pInstance(SecondAgent value)
 {
     pInstance = value;
 }
        public override bool Load()
        {
            AgentMeta.TotalSignature = 2144556769;

            AgentMeta meta;

            // behaviac.Agent
            meta = new AgentMeta(24743406);
            AgentMeta._AgentMetas_[2436498804] = meta;
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            // FirstAgent
            meta = new AgentMeta(1086210822);
            AgentMeta._AgentMetas_[1778122110] = meta;
            meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((FirstAgent)self)._set_p1(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p1()); }));
            meta.RegisterMemberProperty(1144200279, new CMemberProperty <SecondAgent>("pInstance", delegate(Agent self, SecondAgent value) { ((FirstAgent)self)._set_pInstance(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_pInstance()); }));
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); }));
            meta.RegisterMethod(1505908390, new CAgentMethodVoid(delegate(Agent self) { ((FirstAgent)self).SayHello(); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            // SecondAgent
            meta = new AgentMeta(2420330950);
            AgentMeta._AgentMetas_[2432194202] = meta;
            meta.RegisterMemberProperty(1462860768, new CMemberProperty <int>("p2", delegate(Agent self, int value) { ((SecondAgent)self)._set_p2(value); }, delegate(Agent self) { return(((SecondAgent)self)._get_p2()); }));
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { SecondAgent.LogMessage(param0); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            AgentMeta.Register <behaviac.Agent>("behaviac.Agent");
            AgentMeta.Register <FirstAgent>("FirstAgent");
            AgentMeta.Register <SecondAgent>("SecondAgent");

            Agent.RegisterInstanceName <SecondAgent>("SecondAgentInstance");
            return(true);
        }
Exemplo n.º 11
0
        public override bool Load()
        {
            AgentMeta.TotalSignature = 1896202473;

            AgentMeta meta;

            // behaviac.Agent
            meta = new AgentMeta(24743406);
            AgentMeta._AgentMetas_[2436498804] = meta;
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            // FirstAgent
            meta = new AgentMeta(3588288675);
            AgentMeta._AgentMetas_[1778122110] = meta;
            meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((FirstAgent)self)._set_p1(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p1()); }));
            meta.RegisterMemberProperty(1462860768, new CMemberProperty <FirstStruct>("p2", delegate(Agent self, FirstStruct value) { ((FirstAgent)self)._set_p2(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p2()); }));
            meta.RegisterMemberProperty(1311394465, new CMemberProperty <FirstEnum>("p3", delegate(Agent self, FirstEnum value) { ((FirstAgent)self)._set_p3(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p3()); }));
            meta.RegisterMemberProperty(1144200279, new CMemberProperty <System.Object>("pInstance", delegate(Agent self, System.Object value) { ((FirstAgent)self)._set_pInstance(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_pInstance()); }));
            meta.RegisterMethod(3345343196, new CAgentMethodVoid <int>(delegate(Agent self, int param0) { }) /* event_task */);
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); }));
            meta.RegisterMethod(702722749, new CMethod_FirstAgent_Say());
            meta.RegisterMethod(1505908390, new CAgentMethodVoid(delegate(Agent self) { ((FirstAgent)self).SayHello(); }));
            meta.RegisterMethod(2645266540, new CAgentMethod <behaviac.EBTStatus, string, bool>(delegate(Agent self, string value, bool isLatent) { return(((FirstAgent)self).Says(value, isLatent)); }));
            meta.RegisterMethod(664995375, new CAgentMethod <behaviac.EBTStatus>(delegate(Agent self) { return(((FirstAgent)self).Start()); }));
            meta.RegisterMethod(2065006847, new CAgentMethodVoid <int>(delegate(Agent self, int param0) { }) /* t1 */);
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());
            meta.RegisterMethod(994837275, new CAgentMethod <behaviac.EBTStatus>(delegate(Agent self) { return(((FirstAgent)self).Wait()); }));

            // SecondAgent
            meta = new AgentMeta(2420330950);
            AgentMeta._AgentMetas_[2432194202] = meta;
            meta.RegisterMemberProperty(1462860768, new CMemberProperty <int>("p2", delegate(Agent self, int value) { ((SecondAgent)self)._set_p2(value); }, delegate(Agent self) { return(((SecondAgent)self)._get_p2()); }));
            meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { SecondAgent.LogMessage(param0); }));
            meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd());
            meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear());
            meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains());
            meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength());
            meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove());

            AgentMeta.Register <behaviac.Agent>("behaviac.Agent");
            AgentMeta.Register <FirstAgent>("FirstAgent");
            AgentMeta.Register <SecondAgent>("SecondAgent");
            AgentMeta.Register <FirstEnum>("FirstEnum");
            ComparerRegister.RegisterType <FirstEnum, CompareValue_FirstEnum>();
            AgentMeta.Register <FirstStruct>("FirstStruct");
            ComparerRegister.RegisterType <FirstStruct, CompareValue_FirstStruct>();

            Agent.RegisterInstanceName <SecondAgent>("SecondAgentInstance");
            return(true);
        }