public static Coroutine StartCoroutine(this Node node, IEnumerator routine)
        {
            MonoBehaviourController controller = UnityEngineAutoLoad.Instance.GetMonoBehaviourController(node);

            if (controller != null)
            {
                controller.coroutines.Add(routine);
            }

            return(new Coroutine(routine));
        }
Esempio n. 2
0
        void CheckNode(Node currentNode)
        {
            UseAsMonoBehaviour attr = currentNode.GetType().GetCustomAttribute <UseAsMonoBehaviour>();

            Debug.Log("Node: " + currentNode.GetName());

            if (attr != null)
            {
                monoNodes.Add(currentNode);
                monoBehaviours[currentNode] = new MonoBehaviourController(currentNode);
                monoBehaviours[currentNode].Awake();
            }

            for (int i = 0; i < currentNode.GetChildCount(); i++)
            {
                CheckNode(currentNode.GetChild(i));
            }
        }