private static void RefreshPlayerPrefsInspector() { var inspector = GenericInspectorRegistry.Get("Player Prefs"); inspector.ResetFields(); inspector.RegisterHeader("Debug"); inspector.RegisterButton("Clear Player Prefs", () => { PlayerPrefs.DeleteAll(); RefreshPlayerPrefsInspector(); }); inspector.RegisterHeader("Player Prefs (Display)"); inspector.RegisterLabel("NOTE: This displays raw-text for the plist files, does not update during game."); string[] plistPaths = PlayerPrefsManager.GetPlistPaths(); if (plistPaths == null) { inspector.RegisterLabel("No Player Prefs Found!"); } else { foreach (string plistPath in plistPaths) { inspector.RegisterHeader(Path.GetFileName(plistPath)); inspector.RegisterLabel(PlayerPrefsManager.GetDataForPlistPath(plistPath)); } } }
protected override void OnInitialized() { var inspector = GenericInspectorRegistry.Get("PHASERBEAK"); inspector.BeginDynamic(); inspector.RegisterHeader("Main Menu State"); inspector.RegisterButton("Toggle Main Menu Visible", ToggleMainMenuVisible); dynamicGroup_ = inspector.EndDynamic(); }
private static void RefreshManifests() { var inspector = GenericInspectorRegistry.Get("Build Manifests"); inspector.ResetFields(); foreach (var kvp in BuildManifestRegistry.TypeManifests) { Type type = kvp.Key; IBuildManifest manifest = kvp.Value; inspector.RegisterHeader(type.Name); inspector.RegisterLabel(manifest.ToString()); } }
private static void Initialize() { GenericInspector inspector = GenericInspectorRegistry.Get("PHASERBEAK"); inspector.RegisterHeader("Properties"); inspector.RegisterColorField("Background Color", () => GameConstants.Instance.BackgroundColor, (c) => GameConstants.Instance.BackgroundColor = c); inspector.RegisterToggle("Show FPS", () => FPSView.Enabled, (b) => FPSView.Enabled = b); inspector.RegisterToggle("Zoom In On Survivors", () => InGameConstants.ZoomInOnSurvivors, (b) => InGameConstants.ZoomInOnSurvivors = b); inspector.RegisterButton("Reset All The Things", () => { PHASERBEAKDebug.ResetAllThings(); }); inspector.RegisterHeader("Recording Mode Properties"); inspector.RegisterToggle("Recording Mode", () => RecordingMode.Active, (b) => RecordingMode.Active = b); inspector.RegisterToggle("Register Human Players (off for AI only)", () => InGameConstants.RegisterHumanPlayers, (b) => InGameConstants.RegisterHumanPlayers = b); inspector.RegisterToggle("Show Scoring View", () => InGameConstants.ShowScoringView, (b) => InGameConstants.ShowScoringView = b); inspector.RegisterToggle("Show Hints View", () => InGameConstants.ShowHintsView, (b) => InGameConstants.ShowHintsView = b); inspector.RegisterToggle("Show Next Unlock", () => InGameConstants.ShowNextGameModeUnlockView, (b) => InGameConstants.ShowNextGameModeUnlockView = b); inspector.RegisterHeader("Battle"); GameModeOverride.RegisterPopup(inspector); inspector.RegisterButton("Clear Focus (0)", () => BattleCamera.Instance.ClearTransformsOfInterest()); inspector.RegisterButton("Focus On Player 1 (1)", () => BattleCameraDebug.FocusOnPlayer(1)); inspector.RegisterButton("Focus On Player 2 (2)", () => BattleCameraDebug.FocusOnPlayer(2)); inspector.RegisterButton("Focus On Player 3 (3)", () => BattleCameraDebug.FocusOnPlayer(3)); inspector.RegisterButton("Focus On Player 4 (4)", () => BattleCameraDebug.FocusOnPlayer(4)); // TODO (darren): add space inspector.RegisterButton("Fill Pending Scores", () => { Player player = RegisteredPlayers.AllPlayers.FirstOrDefault(); if (player == null) { return; } for (int i = 0; i < GameConstants.Instance.ScoreToWin; i++) { PlayerScores.IncrementPendingScoreFor(player); } }); }