private void Init() { SkipDisplay = CreateChild <SkipDisplay>("skip", 100); { SkipDisplay.Anchor = AnchorType.BottomStretch; SkipDisplay.Pivot = PivotType.Bottom; SkipDisplay.SetOffsetHorizontal(0f); SkipDisplay.Y = 0f; SkipDisplay.Height = 200f; } }
/// <inheritdoc /> /// <summary> /// </summary> /// <param name="screen"></param> public GameplayScreenView(Screen screen) : base(screen) { Screen = (GameplayScreen)screen; CreateBackground(); CreateProgressBar(); CreateScoreDisplay(); CreateAccuracyDisplay(); // Create judgement status display JudgementCounter = new JudgementCounter(Screen) { Parent = Container }; CreateKeysPerSecondDisplay(); CreateGradeDisplay(); CreateScoreboard(); SkipDisplay = new SkipDisplay(Screen, SkinManager.Skin.Skip) { Parent = Container }; // Create screen transitioner to perform any animations. Transitioner = new Sprite() { Parent = Container, Size = new ScalableVector2(WindowManager.Width, WindowManager.Height), Tint = Color.Black, Alpha = 1, Animations = { // Fade in from black. new Animation(AnimationProperty.Alpha, Easing.Linear, 1, 0, 1500) } }; // Create pause screen last. PauseScreen = new PauseScreen(Screen) { Parent = Container }; // Notify the user if their local offset is actually set for this map. if (MapManager.Selected.Value.LocalOffset != 0) { NotificationManager.Show(NotificationLevel.Info, $"The local audio offset for this map is: {MapManager.Selected.Value.LocalOffset}ms"); } }
/// <inheritdoc /> /// <summary> /// </summary> /// <param name="screen"></param> public GameplayScreenView(Screen screen) : base(screen) { Screen = (GameplayScreen)screen; RatingProcessor = new RatingProcessorKeys(MapManager.Selected.Value.DifficultyFromMods(Screen.Ruleset.ScoreProcessor.Mods)); CreateBackground(); if (OnlineManager.CurrentGame != null && OnlineManager.CurrentGame.Ruleset == MultiplayerGameRuleset.Battle_Royale && ConfigManager.EnableBattleRoyaleBackgroundFlashing.Value) { BattleRoyaleBackgroundAlerter = new BattleRoyaleBackgroundAlerter(this); } if (!Screen.IsPlayTesting && !Screen.IsCalibratingOffset) { CreateScoreboards(); } CreateProgressBar(); CreateScoreDisplay(); CreateRatingDisplay(); CreateAccuracyDisplay(); if (ConfigManager.DisplayComboAlerts.Value) { ComboAlert = new ComboAlert(Screen.Ruleset.ScoreProcessor) { Parent = Container } } ; // Create judgement status display if (ConfigManager.DisplayJudgementCounter.Value) { if (OnlineManager.CurrentGame == null || OnlineManager.CurrentGame.Ruleset != MultiplayerGameRuleset.Team) { JudgementCounter = new JudgementCounter(Screen) { Parent = Container } } ; } CreateKeysPerSecondDisplay(); CreateGradeDisplay(); SkipDisplay = new SkipDisplay(Screen, SkinManager.Skin.Skip) { Parent = Container }; if (Screen.IsMultiplayerGame) { MultiplayerEndTime = new MultiplayerEndGameWaitTime { Parent = Container, Alignment = Alignment.MidCenter }; } // Create screen transitioner to perform any animations. Transitioner = new Sprite() { Parent = Container, Size = new ScalableVector2(WindowManager.Width, WindowManager.Height), Tint = Color.Black, Alpha = 1, Animations = { // Fade in from black. new Animation(AnimationProperty.Alpha, Easing.Linear, 1, 0, 1500) } }; // Create pause screen last. PauseScreen = new PauseScreen(Screen) { Parent = Container }; // Notify the user if their local offset is actually set for this map. if (MapManager.Selected.Value.LocalOffset != 0) { NotificationManager.Show(NotificationLevel.Info, $"The local audio offset for this map is: {MapManager.Selected.Value.LocalOffset}ms"); } if (Screen.IsCalibratingOffset) { Tip = new OffsetCalibratorTip { Parent = Container, Alignment = Alignment.MidCenter }; } if (OnlineManager.Client != null) { OnlineManager.Client.OnGameEnded += OnGameEnded; } }