예제 #1
0
 private void OnDestroy()
 {
     if (!G20_ComponentUtility.CheckRoot())
     {
         return;
     }
     G20_HitObjectCabinet.GetInstance().Remove(this);
 }
예제 #2
0
 public static T GetInstance()
 {
     if (!Instance && !(Instance = G20_ComponentUtility.FindComponentOnScene <T>()))
     {
         var obj = new GameObject("SingletonEmpty");
         obj.transform.SetParent(G20_ComponentUtility.Root);
         Instance = obj.AddComponent <T>();
     }
     return(Instance);
 }
예제 #3
0
    // 空中から出現する


    // Use this for initialization
    void Start()
    {
        timer = stageTotalTime;

        enemyPopper  = G20_ComponentUtility.FindComponentOnScene <G20_EnemyPopper>();
        enemyCabinet = G20_EnemyCabinet.GetInstance();

        // ポップ位置情報の確保
        popPositions = enemyPopper.transform.GetComponentsInChildren <G20_EnemyPopPosition>();
        Array.Sort(popPositions, (a, b) => a.number - b.number);
        gameManager = G20_GameManager.GetInstance();

        scoreAppleCanPopTimeMin = stageTotalTime * 0.1f;

        SequenceEnter();
    }
    void Start()
    {
        _gameController       = GameObject.Find("GameManager").GetComponent <GameController>();
        _coordinateManager    = GameObject.Find("GameManager").GetComponent <CoordinateManager>();
        gesslerShootPerformer = G20_ComponentUtility.FindComponentOnScene <G20_GesslerShootPerformer>();

        titleCanvas.SetActive(true);
        G20_BGMManager.GetInstance().Play(G20_BGMType.TITLE);
        paramCanvas.SetActive(false);

        //Playerが死んだときにGameOverに移行させるためにアクションを追加
        playerObj.deathActions += (x, y) => GameFailed();

        RenderSettings.ambientLight = startAmbient;
        RenderSettings.fogColor     = startFogColor;
        RenderSettings.fogDensity   = startFogDensity;
    }
 private void Awake()
 {
     DebugActivate(false);
     if (Description)
     {
         Description.text = "F3(Debug)" + "\n"
                            + "I(Invin)" + "\n"
                            + "C(Clear)" + "\n"
                            + "U(UpScore)" + "\n"
                            + "G(UpGoldPoint)" + "\n"
                            + "S(ShotCheat)" + "\n"
                            + "←(EneSpe)→" + "\n"
                            + "O(CreSco10)P" + "\n"
                            + "K(CreSco1)L" + "\n"
                            + "F12(CreScoSave)" + "\n"
                            + "7(ClearWait5)8" + "\n"
                            + "Tab(Save)";
     }
     autoShooter = G20_ComponentUtility.FindComponentOnScene <G20_DebugAutoShooter>();
     G20_NetworkManager.GetInstance().creatorScore[0] = LoadCreatorsScore(0);
     G20_NetworkManager.GetInstance().creatorScore[1] = LoadCreatorsScore(1);
     G20_ClearPerformer.GetInstance().endWaitTime     = LoadEndWait();
     UpdateCreScoAndClearWait();
 }