示例#1
0
        protected override EBTStatus update_impl(behaviac.Agent pAgent, behaviac.EBTStatus childStatus)
        {
            int  opl = (int)AgentMetaVisitor.GetProperty(pAgent, "p1");
            int  opr = 3;
            bool op  = opl == opr;

            return(op ? EBTStatus.BT_SUCCESS : EBTStatus.BT_FAILURE);
        }
示例#2
0
        protected override EBTStatus update_impl(behaviac.Agent pAgent, behaviac.EBTStatus childStatus)
        {
            EBTStatus result = EBTStatus.BT_SUCCESS;
            int       opr    = 5;

            behaviac.Agent pAgent_opl = (SecondAgent)AgentMetaVisitor.GetProperty(pAgent, "pInstance");
            pAgent_opl.SetVariable <int>("p2", 1462860768u, opr);
            return(result);
        }
示例#3
0
        protected override EBTStatus update_impl(behaviac.Agent pAgent, behaviac.EBTStatus childStatus)
        {
            behaviac.Agent pAgent_opl = behaviac.Utils.GetParentAgent(pAgent, "SecondAgentInstance");
            int            opl        = (int)AgentMetaVisitor.GetProperty(pAgent_opl, "p2");

            behaviac.Agent pAgent_opr = (SecondAgent)AgentMetaVisitor.GetProperty(pAgent, "pInstance");
            int            opr        = (int)AgentMetaVisitor.GetProperty(pAgent_opr, "p2");
            bool           op         = opl > opr;

            return(op ? EBTStatus.BT_SUCCESS : EBTStatus.BT_FAILURE);
        }