Ejemplo n.º 1
0
        public bool IsCompatibleWithBot(ActionCollection botActions)
        {
            foreach (MyStringId actionId in m_treeDesc.ActionIds)
            {
                if (!botActions.ContainsActionDesc(actionId))
                {
                    m_tmpHelper.Add(actionId);
                }
            }

            if (m_tmpHelper.Count > 0)
            {
                StringBuilder failText = new StringBuilder("Error! The behavior tree is not compatible with the bot. Missing bot actions: ");
                foreach (var action in m_tmpHelper)
                {
                    failText.Append(action.ToString());
                    failText.Append(", ");
                }
                System.Diagnostics.Debug.Fail(failText.ToString());
                m_tmpHelper.Clear();
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 2
0
        public bool IsCompatibleWithBot(ActionCollection botActions)
        {
            foreach (MyStringId id in this.m_treeDesc.ActionIds)
            {
                if (!botActions.ContainsActionDesc(id))
                {
                    m_tmpHelper.Add(id);
                }
            }
            if (m_tmpHelper.Count <= 0)
            {
                return(true);
            }
            StringBuilder builder = new StringBuilder("Error! The behavior tree is not compatible with the bot. Missing bot actions: ");

            foreach (MyStringId id2 in m_tmpHelper)
            {
                builder.Append(id2.ToString());
                builder.Append(", ");
            }
            m_tmpHelper.Clear();
            return(false);
        }
Ejemplo n.º 3
0
        public bool IsCompatibleWithBot(ActionCollection botActions)
        {
            foreach (MyStringId actionId in m_treeDesc.ActionIds)
            {
                if (!botActions.ContainsActionDesc(actionId))
                {
                    m_tmpHelper.Add(actionId);
                }
            }

            if (m_tmpHelper.Count > 0)
            {
                StringBuilder failText = new StringBuilder("Error! The behavior tree is not compatible with the bot. Missing bot actions: ");
                foreach (var action in m_tmpHelper)
                {
                    failText.Append(action.ToString());
                    failText.Append(", ");
                }
                System.Diagnostics.Debug.Fail(failText.ToString());
                m_tmpHelper.Clear();
                return false;
            }
            else
            {
                return true;
            }
        }