Esempio n. 1
0
        private bool EvaluateCharacterNode(bool nextNode)
        {
            CharacterManager characterManager = m_sceneManager.GetCharacterManager();

            if (characterManager != null)
            {
                if (m_currentNode is CharacterNode)
                {
                    m_nodeProcessor.ProcessCharacter(nextNode);
                    event_NodeEvaluted?.Invoke(TypesNode.CharacterNode);
                    return(true);
                }
                else if (m_currentNode is CharacterScaleNode || m_currentNode is CharacterTranslateNode)
                {
                    m_nodeProcessor.ProcessCharacterTransform();
                    if (m_currentNode is CharacterTranslateNode)
                    {
                        event_NodeEvaluted?.Invoke(TypesNode.CharacterTranslateNode);
                    }
                    else
                    {
                        event_NodeEvaluted?.Invoke(TypesNode.CharacterScaleNode);
                    }
                    return(true);
                }
            }
            else
            {
                if (m_currentNode is CharacterNode || m_currentNode is CharacterScaleNode || m_currentNode is CharacterTranslateNode)
                {
                    Debug.LogError("CNovell: SceneManager требует CharacterComponent, если ты используешь узлы символов!");
                }
            }

            return(false);
        }