コード例 #1
0
        public void LoadGameSceneLoadedBehaviors()
        {
            if (InputManager == null)
            {
                InputManager = new GameObject(nameof(InputManager)).AddComponent <InputManager>();
            }
            InputManager.BeginPolling();

            if (BeatSaberBehavior == null)
            {
                BeatSaberBehavior = new GameObject(nameof(BeatSaberBehavior)).AddComponent <BeatSaberBehavior>();
            }
            BeatSaberBehavior.BeginGameCoreScene();

            if (BeatSpearBehavior == null)
            {
                BeatSpearBehavior = new GameObject(nameof(BeatSpearBehavior)).AddComponent <BeatSpearBehavior>();
            }
            BeatSpearBehavior.BeginGameCoreScene();

            if (DarthMaulBehavior == null)
            {
                DarthMaulBehavior = new GameObject(nameof(DarthMaulBehavior)).AddComponent <DarthMaulBehavior>();
            }
            DarthMaulBehavior.BeginGameCoreScene();

            if (GameModifiersBehavior == null)
            {
                GameModifiersBehavior = new GameObject(nameof(GameModifiersBehavior)).AddComponent <GameModifiersBehavior>();
            }
            GameModifiersBehavior.BeginGameCoreScene();
        }
コード例 #2
0
        private void OnGameSceneLoaded()
        {
            if (beatSaberBehavior == null)
            {
                beatSaberBehavior = new GameObject(nameof(BeatSaberBehavior)).AddComponent <BeatSaberBehavior>();
            }
            beatSaberBehavior.BeginGameCoreScene();

            if (beatSpearBehavior == null)
            {
                beatSpearBehavior = new GameObject(nameof(BeatSpearBehavior)).AddComponent <BeatSpearBehavior>();
            }
            beatSpearBehavior.BeginGameCoreScene();

            if (darthMaulBehavior == null)
            {
                darthMaulBehavior = new GameObject(nameof(DarthMaulBehavior)).AddComponent <DarthMaulBehavior>();
            }
            darthMaulBehavior.BeginGameCoreScene();

            if (gameModifiersBehavior == null)
            {
                gameModifiersBehavior = new GameObject(nameof(GameModifiersBehavior)).AddComponent <GameModifiersBehavior>();
            }
            gameModifiersBehavior.BeginGameCoreScene();
        }