예제 #1
0
        /// <summary>
        /// コルーチンを管理するクラスを取得する。
        /// </summary>
        public static CoroutineManager CoroutineManager(this asd.Scene scene)
        {
            var component = (CoroutineComponent)scene.GetComponent(CoroutineComponentName);

            if (component == null)
            {
                component = new CoroutineComponent();
                scene.AddComponent(component, CoroutineComponentName);
            }

            return(component.Coroutine);
        }
예제 #2
0
        private static SceneComponent <asd.Scene> GetSceneComponent(this asd.Scene scene)
        {
            var component = (SceneComponent <asd.Scene>)scene.GetComponent(ComponentName);

            if (component == null)
            {
                component = new SceneComponent <asd.Scene>(ComponentName);
                component.Attach(scene);
            }

            return(component);
        }