Пример #1
0
        public void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
                SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged;
                SceneManager.sceneLoaded        += SceneManager_sceneLoaded;
                DontDestroyOnLoad(gameObject);

                Plugin.Log("Tweak Manager started.", Plugin.LogLevel.DebugOnly);

                MoveEnergyBar.OnLoad(transform);
                ScoreMover.OnLoad(transform);
                InGameClock.OnLoad(transform);
                TimeSpentClock.OnLoad(transform);
                IngameTimeSpentClock.OnLoad(transform);
                NoteHitVolume.OnLoad(transform);
                OneColour.OnLoad(transform);
                SongDataModifer.OnLoad(transform);
                MusicVolume.OnLoad(transform);
                FireworksTweaks.OnLoad(transform);
                ClickShockwave.OnLoad(transform);
                LevelsFailedTweak.OnLoad(transform);
            }
            else
            {
                Destroy(this);
            }
        }
 public void Awake()
 {
     if (Instance == null)
     {
         Plugin.Log("IngameTimeSpentClock awake.", Plugin.LogLevel.DebugOnly);
         Instance = this;
         SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged;
         DontDestroyOnLoad(gameObject);
         _TimePos          = Settings.IngameTimeSpentClockPosition;
         _TimeRot          = Settings.IngameTimeSpentClockRotation;
         _TimeSize         = Settings.IngameTimeSpentClockFontSize;
         _HideWhilePlaying = Settings.HideIngameTimeSpentClockIngame;
         _MessageTemplate  = Settings.IngameTimeSpentClockMessageTemplate;
         _TimeSpent        = new TimeSpan(0);
         _IsPlayerIngame   = false;
     }
     else
     {
         Destroy(this);
     }
 }