コード例 #1
0
    // main event
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this);
        }

        Init();
    }
コード例 #2
0
    private void InitManagers()
    {
        if (!spawnManager)
        {
            spawnManager = SpawnPlatforms_Plt2D.Instance;
        }

        if (!levelManager)
        {
            levelManager = LevelManager.Instance;
        }

        if (!menuManager)
        {
            menuManager = UI_Plt2D.Instance;
        }

        if (!soundManager)
        {
            soundManager = BaseSoundController.Instance;
        }
    }