private void Unload() { SaberTailorPatches.RemoveHarmonyPatches(); ScoreUtility.Cleanup(); Configuration.Save(); RemoveEvents(); }
/** * Constructor */ public GameView(GameBoxForm parent, GameLogic logic, GameData data, CreditSystem credit) { InitializeComponent(); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); //performance buff SetStyle(ControlStyles.OptimizedDoubleBuffer, true); _parent = parent; bullets = new List <Bullet>(); alienbullets = new List <Bullet>(); this.credit = credit; this.logic = logic; this.data = data; this.logic.SetGameView(this); scoreUtil = new ScoreUtility(); logic.SetScoreUtil(scoreUtil); lblHighScore.Text = scoreUtil.getTopScore().ToString(); InitializeStartScreen(); InitializeGameObjects(); this.logic.SetupCollisionHandler(); fpsTimer.Start(); }
public void OnGameSceneLoaded() { CustomNote activeNote = NoteAssetLoader.CustomNoteObjects[NoteAssetLoader.SelectedNote]; if (activeNote.FileName != "DefaultNotes") { MaterialSwapper.GetMaterials(); MaterialSwapper.ReplaceMaterialsForGameObject(activeNote.NoteLeft); MaterialSwapper.ReplaceMaterialsForGameObject(activeNote.NoteRight); if (activeNote.NoteDotLeft != null) { MaterialSwapper.ReplaceMaterialsForGameObject(activeNote.NoteDotLeft); } if (activeNote.NoteDotRight != null) { MaterialSwapper.ReplaceMaterialsForGameObject(activeNote.NoteDotRight); } if (activeNote.NoteBomb != null) { MaterialSwapper.ReplaceMaterialsForGameObject(activeNote.NoteBomb); } CheckCustomNotesScoreDisable(); } else if (ScoreUtility.ScoreIsBlocked) { ScoreUtility.EnableScoreSubmission("ModifiersEnabled"); } }
private void Unload() { RemoveEvents(); CustomNotesPatches.RemoveHarmonyPatches(); ScoreUtility.Cleanup(); Configuration.Save(); NoteAssetLoader.Clear(); SettingsUI.RemoveMenu(); }
#pragma warning restore IDE0051 // Used by MonoBehaviour private void Load() { // Allow the user to run in any mode, but don't allow ScoreSubmission if (IsPreventingScoreSubmission) { ScoreUtility.DisableScoreSubmission(Name); } else if (ScoreUtility.ScoreIsBlocked) { ScoreUtility.EnableScoreSubmission(Name); } StartCoroutine(ApplyGameCoreModifications()); }
internal static void CheckCustomNotesScoreDisable() { if (SceneManager.GetActiveScene().name == "GameCore") { string fileName = NoteAssetLoader.CustomNoteObjects[NoteAssetLoader.SelectedNote].FileName; if (fileName != "DefaultNotes") { if (BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.gameplayModifiers.ghostNotes == true || BS_Utils.Plugin.LevelData.GameplayCoreSceneSetupData.gameplayModifiers.disappearingArrows == true) { ScoreUtility.DisableScoreSubmission("ModifiersEnabled"); } else { ScoreUtility.EnableScoreSubmission("ModifiersEnabled"); } } } }
public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) { if (nextScene.name == "GameCore") { if (Configuration.Trail.TweakEnabled) { new GameObject(PluginName).AddComponent <SaberTrail>(); } if (Configuration.Scale.TweakEnabled) { new GameObject(PluginName).AddComponent <SaberLength>(); } else if (ScoreUtility.ScoreIsBlocked) { ScoreUtility.EnableScoreSubmission(SaberLength.Name); } } else if (nextScene.name == "MenuViewControllers" && prevScene.name == "EmptyTransition") { BSMLSettings.instance.AddSettingsMenu("SaberTailor", "SaberTailor.Settings.UI.Views.mainsettings.bsml", MainSettings.instance); } }
private void AddScoreUtility(ScoreUtility score) { this.score = score; }
public void SetScoreUtil(ScoreUtility util) { this.score = util; }
public void SetScoreUtil(ScoreUtility util) { this.scoreUtil = util; highScore.SetScoreUtil(util); }