Example #1
0
        public static void RemoveConstruct(Construct construct)
        {
            constructs.RemoveAt(constructs.IndexOf(construct));
            GlobalGameStatus.ConstructDestroyed(construct);
#if UNITY_EDITOR
            Debug.Log(construct.Id + " destroyed");
#endif
        }
Example #2
0
        // constructs
        public static void AddConstruct(Construct construct)
        {
            constructs.Add(construct);
            GlobalGameStatus.NewConstructBuilded(construct);
#if UNITY_EDITOR
            Debug.Log(construct.Id + " added");
#endif
        }
Example #3
0
    void SetStatus()
    {
        switch (Application.loadedLevelName)
        {
        //タイトルシーン
        case "Title":
            status = GlobalGameStatus.TITLE;
            break;

        //クラシックシーン
        case "MainClassic":
            classicGameControl   = Camera.main.gameObject.GetComponent <Classic.GameControl> ();
            classicGUIControl    = Camera.main.gameObject.GetComponent <Classic.GUIControl> ();
            classicCameraControl = Camera.main.gameObject.GetComponent <Classic.CameraControl> ();

            switch (classicGameControl.Status)
            {
            //ホーム
            case Classic.GameControl.GameStatus.STAT_HOME:
            case Classic.GameControl.GameStatus.STAT_NULL:
                status = GlobalGameStatus.CLASSIC_TITLE;
                //ポストカードモード
                if (classicGUIControl.isPostCardScene)
                {
                    status = GlobalGameStatus.CLASSIC_POSTCARD;
                    //ポストカード表示
                    if (classicGUIControl.isPostCardShow)
                    {
                        status = GlobalGameStatus.CLASSIC_POSTCARDSHOW;
                    }
                }
                if (classicCameraControl.isMoving)
                {
                    status = GlobalGameStatus.CLASSIC_MOVING;
                }
                break;

            //ゲーム中
            case Classic.GameControl.GameStatus.STAT_GAME:
                status = GlobalGameStatus.CLASSIC_GAME;
                //ポーズ中
                if (classicGUIControl.Pose())
                {
                    status = GlobalGameStatus.CLASSIC_POSE;
                }
                if (classicGameControl.isMoving)
                {
                    status = GlobalGameStatus.CLASSIC_MOVING;
                }
                break;
            }
            break;

        //エンドレスシーン
        case "MainEndress":
            endlessGameControl               = Camera.main.gameObject.GetComponent <Endless.GameControl> ();
            endlessGameFrontCanvasControl    = GameObject.FindObjectOfType <Endless.GameFrontCanvasControl> ().GetComponent <Endless.GameFrontCanvasControl> ();
            endlessGameEndFrontCanvasControl = GameObject.FindObjectOfType <Endless.GameEndFrontCanvasControl> ().GetComponent <Endless.GameEndFrontCanvasControl> ();
            endlessFadegroupBackControl      = GameObject.FindObjectOfType <Endless.FadeGroupBackControl> ().GetComponent <Endless.FadeGroupBackControl> ();
            switch (endlessGameControl.Status)
            {
            case Endless.GameControl.GameStatus.STAT_HOME:
            case Endless.GameControl.GameStatus.STAT_NULL:
                status = GlobalGameStatus.ENDLESS_TITLE;
                if (endlessFadegroupBackControl.isPostCardScene)
                {
                    status = GlobalGameStatus.ENDLESS_POSTCARD;
                }
                if (endlessGameFrontCanvasControl.isPostCardShowing)
                {
                    status = GlobalGameStatus.ENDLESS_POSTCARDSHOW;
                }
                if (endlessGameControl.isMovingToPostCard)
                {
                    status = GlobalGameStatus.ENDLESS_MOVING;
                }
                break;

            case Endless.GameControl.GameStatus.STAT_GAME:
                status = GlobalGameStatus.ENDLESS_GAME;
                if (endlessGameControl.isPose == true)
                {
                    status = GlobalGameStatus.ENDLESS_POSE;
                }
                break;

            case Endless.GameControl.GameStatus.STAT_GAMEEND:
                status = GlobalGameStatus.ENDLESS_GAMEEND;
                break;
            }
            break;

        //マルチシーン
        case "MainMultiplayer":
            multiGameControl = Camera.main.gameObject.GetComponent <Multiplayer.GameControl> ();
            multiGameEndFrontCanvasControl = GameObject.FindObjectOfType <Multiplayer.GameEndFrontCanvasControl> ().GetComponent <Multiplayer.GameEndFrontCanvasControl> ();
            switch (multiGameControl.Status)
            {
            case Multiplayer.GameControl.GameStatus.STAT_NULL:
            case Multiplayer.GameControl.GameStatus.STAT_HOME:
                status = GlobalGameStatus.MULTI_TITLE;
                break;

            case Multiplayer.GameControl.GameStatus.STAT_GAME:
                status = GlobalGameStatus.MULTI_GAME;
                break;

            case Multiplayer.GameControl.GameStatus.STAT_GAMEEND:
                status = GlobalGameStatus.MULTI_GAMEEND;
                break;
            }
            break;
        }
    }