コード例 #1
0
        /// <summary>
        /// メインシーン、サブシーンすべてDeactiveか
        /// </summary>
        /// <returns><c>true</c> if this instance is current scene load all deactive; otherwise, <c>false</c>.</returns>
        public bool IsCurrentSceneLoadAllDeactive()
        {
            if (currentSceneNode.state != SceneState.Sleep && currentSceneNode.state != SceneState.Destroy)
            {
                return(false);
            }

            // メインシーンが既に破棄済みの場合もある
            SceneProperty currentProperty = currentSceneNode.property;

            if (currentProperty == null)
            {
                return(true);
            }

            foreach (var subSceneProperty in currentProperty.listAddSubScene)
            {
                SceneNode node = null;
                if (_dictSceneNode.TryGetValue(subSceneProperty.sceneName, out node) == false)
                {
                    continue;
                }
                if (node.state != SceneState.Sleep)
                {
                    return(false);
                }
            }

            return(true);
        }
コード例 #2
0
        public SceneNode(string name, GameObject rootObject, SceneType sceneType)
        {
            this.name          = name;
            this.rootObject    = rootObject;
            this.sceneType     = sceneType;
            this.state         = SceneState.Empty;
            this.isInitialized = false;
            this.isVisibled    = true;

            this._scene    = scene;
            this._property = property;
        }