Ejemplo n.º 1
0
 void AssignmentTask::onexit(Agent* pAgent, EBTStatus s)
 {
     BEHAVIAC_UNUSED_VAR(pAgent);
     BEHAVIAC_UNUSED_VAR(s);
 }
Ejemplo n.º 2
0
 bool ComputeTask::onenter(Agent* pAgent) {
     BEHAVIAC_UNUSED_VAR(pAgent);
     return true;
 }
Ejemplo n.º 3
0
	bool CFileSystem::Delete(const char* szPath, bool bRecursive)
	{
		BEHAVIAC_UNUSED_VAR(bRecursive);

		return remove(szPath) == 0;
	}
Ejemplo n.º 4
0
 bool AssignmentTask::onenter(Agent* pAgent)
 {
     BEHAVIAC_UNUSED_VAR(pAgent);
     return true;
 }
 void ConnectorInterface::OnRecieveMessages(const behaviac::string& msgs)
 {
     BEHAVIAC_UNUSED_VAR(msgs);
 }
Ejemplo n.º 6
0
	bool ActionTask::onenter(Agent* pAgent)
	{
		BEHAVIAC_UNUSED_VAR(pAgent);
		return true;
	}
Ejemplo n.º 7
0
 void                    SetSavedValues(const behaviac::vector<int>& values)
 {
     BEHAVIAC_UNUSED_VAR(values);
 }
Ejemplo n.º 8
0
	void WaitFramesStateTask::onexit(Agent* pAgent, EBTStatus s)
	{
		BEHAVIAC_UNUSED_VAR(pAgent);
		BEHAVIAC_UNUSED_VAR(s);
	}
Ejemplo n.º 9
0
    EBTStatus SelectorLoopTask::update(Agent* pAgent, EBTStatus childStatus)
    {
        BEHAVIAC_UNUSED_VAR(pAgent);
        BEHAVIAC_UNUSED_VAR(childStatus);
        int idx = -1;

        if (childStatus != BT_RUNNING)
        {
            BEHAVIAC_ASSERT(this->m_activeChildIndex != CompositeTask::InvalidChildIndex);

            if (childStatus == BT_SUCCESS)
            {
                return BT_SUCCESS;

            }
            else if (childStatus == BT_FAILURE)
            {
                //the next for starts from (idx + 1), so that it starts from next one after this failed one
                idx = this->m_activeChildIndex;

            }
            else
            {
                BEHAVIAC_ASSERT(false);
            }
        }

        //checking the preconditions and take the first action tree
        uint32_t index = (uint32_t) - 1;

        for (uint32_t i = (idx + 1); i < this->m_children.size(); ++i)
        {
            WithPreconditionTask* pSubTree = (WithPreconditionTask*)this->m_children[i];
            BEHAVIAC_ASSERT(WithPreconditionTask::DynamicCast(pSubTree));

            pSubTree->SetIsUpdatePrecondition(true);
            EBTStatus status = pSubTree->exec(pAgent);
            pSubTree->SetIsUpdatePrecondition(false);

            if (status == BT_SUCCESS)
            {
                index = i;
                break;
            }
        }

        //clean up the current ticking action tree
        if (index != (uint32_t) - 1)
        {
            if (this->m_activeChildIndex != CompositeTask::InvalidChildIndex &&
                this->m_activeChildIndex != (int)index)
            {
                WithPreconditionTask* pCurrentSubTree = (WithPreconditionTask*)this->m_children[this->m_activeChildIndex];
                BEHAVIAC_ASSERT(WithPreconditionTask::DynamicCast(pCurrentSubTree));
                pCurrentSubTree->abort(pAgent);
            }

            for (uint32_t i = index; i < this->m_children.size(); ++i)
            {
                WithPreconditionTask* pSubTree = (WithPreconditionTask*)this->m_children[i];
                BEHAVIAC_ASSERT(WithPreconditionTask::DynamicCast(pSubTree));

                if (i > index)
                {
                    pSubTree->SetIsUpdatePrecondition(true);
                    EBTStatus status = pSubTree->exec(pAgent);
                    pSubTree->SetIsUpdatePrecondition(false);

                    //to search for the first one whose precondition is success
                    if (status != BT_SUCCESS)
                    {
                        continue;
                    }
                }

                EBTStatus s = pSubTree->exec(pAgent);

                if (s == BT_RUNNING)
                {
                    this->m_activeChildIndex = i;

                }
                else
                {
                    //pActionTree->reset(pAgent);

                    if (s == BT_FAILURE)
                    {
                        //THE ACTION failed, to try the next one
                        continue;
                    }
                }

                BEHAVIAC_ASSERT(s == BT_RUNNING || s == BT_SUCCESS);

                return s;
            }
        }

        return BT_FAILURE;
    }
Ejemplo n.º 10
0
 void                    GetSavedValues(behaviac::vector<int>& values) const
 {
     BEHAVIAC_UNUSED_VAR(values);
 }
Ejemplo n.º 11
0
 void SelectorLoopTask::onexit(Agent* pAgent, EBTStatus s)
 {
     BEHAVIAC_UNUSED_VAR(pAgent);
     super::onexit(pAgent, s);
 }
Ejemplo n.º 12
0
void CompositeStochasticTask::onexit(Agent* pAgent, EBTStatus s)
{
    BEHAVIAC_UNUSED_VAR(pAgent);
    BEHAVIAC_UNUSED_VAR(s);
}
Ejemplo n.º 13
0
	void CFileSystem::ReadError(Handle file)
	{
		BEHAVIAC_UNUSED_VAR(file);

		BEHAVIAC_ASSERT(0);
	}
Ejemplo n.º 14
0
 void ComputeTask::onexit(Agent* pAgent, EBTStatus s) {
     BEHAVIAC_UNUSED_VAR(pAgent);
     BEHAVIAC_UNUSED_VAR(s);
 }
Ejemplo n.º 15
0
 void method1(int count)
 {
     BEHAVIAC_UNUSED_VAR(count);
 }
Ejemplo n.º 16
0
bool CVectorFileSystemVisitor::EnterDirectory(const char* fullDirPath, const char* dirName)
{
    BEHAVIAC_UNUSED_VAR(dirName);
    BEHAVIAC_UNUSED_VAR(fullDirPath);
    return true;
}
Ejemplo n.º 17
0
 void method2(int param, float param1)
 {
     BEHAVIAC_UNUSED_VAR(param);
     BEHAVIAC_UNUSED_VAR(param1);
 }
Ejemplo n.º 18
0
	void DecoratorFailureUntilTask::onreset(Agent* pAgent)
	{
		BEHAVIAC_UNUSED_VAR(pAgent);

		this->m_n = 0;
	}
Ejemplo n.º 19
0
 void method3(Param2_t* param, const Param2_t& param1, Param2_t& param2)
 {
     BEHAVIAC_UNUSED_VAR(param);
     BEHAVIAC_UNUSED_VAR(param1);
     BEHAVIAC_UNUSED_VAR(param2);
 }
Ejemplo n.º 20
0
 void WaitforSignalTask::onexit(Agent* pAgent, EBTStatus s)
 {
     BEHAVIAC_UNUSED_VAR(pAgent);
     BEHAVIAC_UNUSED_VAR(s);
 }
Ejemplo n.º 21
0
 void method4(int& param, const float param1, const Param2_t* param2)
 {
     BEHAVIAC_UNUSED_VAR(param);
     BEHAVIAC_UNUSED_VAR(param1);
     BEHAVIAC_UNUSED_VAR(param2);
 }
Ejemplo n.º 22
0
	void ActionTask::onexit(Agent* pAgent, EBTStatus s)
	{
		BEHAVIAC_UNUSED_VAR(pAgent);
		BEHAVIAC_UNUSED_VAR(s);
	}
Ejemplo n.º 23
0
 void Network::tick(float deltaTime)
 {
     BEHAVIAC_UNUSED_VAR(deltaTime);
 }