private void onStartButtonPressed(object sender, EventArgs args) { if (State == SelectState.Starting) { return; } if (Player.Difficulty == Difficulty.Expert && mapRequiresUnlock && !Player.Autoplay) { GameBase.Notify(LocalisationManager.GetString(OsuString.ExpertUnlock), delegate { pendingModeChange = false; }); return; } AudioEngine.PlaySample(OsuSamples.MenuHit); State = SelectState.Starting; pDrawable activatedSprite = null; switch (Player.Difficulty) { case Difficulty.Easy: s_ModeButtonStream.FadeOut(200); s_ModeButtonExpert.FadeOut(200); activatedSprite = s_ModeButtonEasy; break; case Difficulty.Normal: s_ModeButtonEasy.FadeOut(200); s_ModeButtonExpert.FadeOut(200); activatedSprite = s_ModeButtonStream; break; case Difficulty.Expert: s_ModeButtonStream.FadeOut(200); s_ModeButtonEasy.FadeOut(200); activatedSprite = s_ModeButtonExpert; break; } activatedSprite.Transform(new TransformationBounce(Clock.ModeTime, Clock.ModeTime + 500, 1.2f, 0.4f, 1)); activatedSprite.AdditiveFlash(800, 0.8f).Transform(new TransformationF(TransformationType.Scale, 1, 1.5f, Clock.Time, Clock.Time + 800, EasingTypes.In)); background.FlashColour(new Color4(200, 200, 200, 255), 800); s_ModeArrowLeft.FadeOut(200); s_ModeArrowRight.FadeOut(200); s_Footer.AdditiveFlash(500, 0.5f); GameBase.Scheduler.Add(delegate { Director.ChangeMode(OsuMode.Play); }, 800); }
protected void score_GotReplayData(object sender) { score.GotReplayData -= score_GotReplayData; LoadingReplay = false; if (score.Replay != null && score.Replay.Count > 0) { NotificationManager.ClearMessageMassive(); StreamingManager.StopSpectating(false); AudioEngine.PlaySamplePositional(@"menuhit"); InputManager.ReplayMode = true; InputManager.ReplayScore = score; Player.Seed = score.Seed; GameBase.ChangeMode(OsuModes.Play); } else { NotificationManager.ShowMessageMassive("Replay data is not available for this play!", 2000); spriteManagerWideScrolling.BlacknessTarget = 0; b_replay.FadeOut(100); b_replay.HandleInput = false; } }
internal void SetVolume(int val) { if (val == volume.Value) { return; } Visible = true; int volumeBefore = volume.Value; volume.Value = val; if (volume.Value == 100) { backgroundMax.Bypass = false; backgroundMax.FadeIn(150); } else { backgroundMax.FadeOut(150); } AudioEngine.Click(null, @"sliderbar", 1.1f - (0.5f - (volume.Value / 100f)) * 0.15f * (volume.Value != volumeBefore ? 1 : 4)); return; }
internal static void NotificationClicked(object sender, EventArgs e) { pSprite p = sender as pSprite; p.FadeOut(50); p.AlwaysDraw = false; }
internal override IncreaseScoreType Hit() { StopSound(); spriteGlow?.FadeOut(300); IsHit = true; if (scoringRotationCount <= rotationRequirement - 1) { return(IncreaseScoreType.Miss); } PlaySound(); if (scoringRotationCount > rotationRequirement + 1) { return(IncreaseScoreType.Hit300); } if (scoringRotationCount > rotationRequirement) { return(IncreaseScoreType.Hit100); } return(IncreaseScoreType.Hit50); }
internal bool EarnCoin() { if (!GameBase.HasLogin) { return(true); } pSprite coin = coinSingular.Clone(); coin.Position = InputManager.CursorPosition / GameBase.WindowManager.Ratio; coin.Depth = 0.99f; coin.FadeOut(1500); spriteManagerDialog.Add(coin); physics.Add(coin, new Vector2((float)RNG.NextDouble() * 100, (float)RNG.NextDouble() * -100)); pSprite coinShine = coinSingular.Clone(); coinShine.Additive = true; coinShine.OnUpdate += delegate { coinShine.Position = coin.Position; }; coinShine.FadeOut(500); spriteManagerDialog.Add(coinShine); AudioEngine.PlaySample(@"coins-earn", 80); Count++; pWebRequest snr = new pWebRequest(string.Format(General.WEB_ROOT + "/web/coins.php?action=earn&u={0}&h={1}&c={2}&cs={3}", ConfigManager.sUsername, ConfigManager.sPassword, Count, Checksum)); snr.Finished += snr_onFinish; snr.Perform(); return(true); }
private bool onClick(object sender, EventArgs e) { if (coinsDialog != null && coinsDialog.Alpha == 1) { if (coinsDialog.Hovering) { pSprite error; spriteManagerDialog.Add(error = new pSprite(@"coins-error", new Vector2(0, 0), SkinSource.All, Origins.Centre, Fields.Centre) { Depth = 0.9f, Scale = 1.4f }); error.AlwaysDraw = false; error.FadeOut(5000, EasingTypes.InExpo); error.ScaleTo(1, 200, EasingTypes.OutElastic); Recharge(); } else { coinsDialog.FadeOut(100); } coinsDialog.AlwaysDraw = false; coinsDialog = null; return(true); } return(false); }
internal override void UpdateGeneral() { caughtFruits.ForEach(hf => hf.ModifyPosition(catcher1.Position + hf.CatchOffset)); caughtSprites.ForEach(s => s.Position = catcher1.Position + s.InitialPosition); caughtSprites.RemoveAll(s => !s.IsVisible); if (Dashing && GameBase.Time - lastDashSpriteTime > 16) { pSprite catcher1a = new pSprite(catcher1.Texture, Fields.Gamefield, Origins.TopCentre, Clocks.Game, catcher1.Position, 0.84f, false, catcher1.InitialColour); catcher1a.Alpha = 0.5f; catcher1a.FlipHorizontal = catcher1.FlipHorizontal; catcher1a.Additive = true; catcher1a.OriginPosition.Y += 16; catcher1a.Scale = 0.71f; catcher1a.FadeOut(catcher1.Position.X != catcherPositionLastFrame.X ? 250 : 100); hitObjectManager.spriteManager.Add(catcher1a); catcherPositionLastFrame = catcher1.Position; lastDashSpriteTime = GameBase.Time; } if (catcher1.TextureArray != catcherFail) { catcher1.TextureArray = AudioEngine.KiaiEnabled ? catcherKiai : catcherIdle; } }
internal void ConsumeMe() { consumed = true; if (sprite != null) { sprite.FadeOut(40); } }
private void UpdateDimming() { if (!GameBase.SixtyFramesPerSecondFrame) { return; } if (currentDim > DimMaximum + float.Epsilon) { currentDim -= (currentDim - DimMaximum) / adjust_rate; } else if (!BreakMode && currentDim < DimMaximum) { currentDim += (DimMaximum - currentDim) / adjust_rate; if (GameBase.Mode == OsuModes.Play && breakTop.TagNumeric == 1) { if (BeatmapManager.Current.LetterboxInBreaks) { breakTop.FadeOut(200); breakBottom.FadeOut(200); } } breakTop.TagNumeric = 0; } else if (BreakMode && (currentDim != DimMinimum || breakTop.TagNumeric == 0)) { if (currentDim > DimMinimum) { currentDim -= (currentDim - DimMinimum) / adjust_rate; } else { currentDim += (DimMinimum - currentDim) / adjust_rate; } if (GameBase.Mode == OsuModes.Play && breakTop.TagNumeric == 0 && !afterGameplay && !beforeGameplay) { if (BeatmapManager.Current.LetterboxInBreaks) { breakTop.FadeIn(200); breakBottom.FadeIn(200); } } breakTop.TagNumeric = 1; } float blackness = currentDim / 100f; spriteManagerBGWide.Blackness = blackness; spriteManagerBG.Blackness = blackness; spriteManagerFG.Blackness = blackness; spriteManagerMasking.Blackness = blackness; GameBase.TransitionManager.BackgroundAlpha = (1 - blackness) * VideoEfficiency; }
internal void HideRankings(bool instant) { foreach (pDrawable p in rankSprites) { p.FadeOut(instant ? 0 : 300); } s_StarBg.FadeOut(instant ? 0 : 300); s_Star.FadeOut(instant ? 0 : 300); }
private void ThrowFruit(bool happy) { if (!hitObjectManager.hitObjects[hitObjectManager.currentHitObjectIndex].LastInCombo) { return; } if (hitObjectManager.lastHitObject is HitCircleFruitsSpin) { //Spinner end foreach (HitCircleFruits f in caughtFruits) { bounceFruit(f, true); } ((HitCircleFruitsSpin)hitObjectManager.lastHitObject).PlayActualSound(); pSprite exp1 = new pSprite(TextureManager.Load(@"scoreboard-explosion-1", SkinSource.Osu), Fields.Gamefield, Origins.CentreLeft, Clocks.Game, Vector2.Zero, 0.99f, false, Color.White); exp1.Additive = true; exp1.Rotation = (float)(-Math.PI / 2); exp1.FadeOut(800); exp1.Transformations.Add(new Transformation(TransformationType.VectorScale, new Vector2(0, 1.8f), new Vector2(4, 2.2f), GameBase.Time, GameBase.Time + 500, EasingTypes.Out)); exp1.IsVisible = true; caughtSprites.Add(exp1); spriteManagerAdd.Add(exp1); } else if (happy) { //Happy combo foreach (HitCircleFruits f in caughtFruits) { bounceFruit(f, false); } } else { //Sad combo foreach (HitCircleFruits f in caughtFruits) { foreach (pSprite p in f.SpriteCollection) { GameBase.PhysicsManager.Add(p); p.FadeOut(1000); p.AlwaysDraw = false; } } } caughtFruits.Clear(); }
internal void Hide() { foreach (pSprite p in SpriteCollection) { p.FadeOut(0); } SpriteBackground.FadeOut(0); SpriteScore.FadeOut(0); SpriteName.FadeOut(0); SpriteRank.FadeOut(0); }
internal override unsafe void Update() { base.Update(); if (KeyboardHandler.ControlPressed) { legendSprites.ForEach(s => s.Alpha = 1); return; } legendSprites.ForEach(s => s.Alpha = 0); for (int i = 0; i < lastAmountGarbageCollects.Length; ++i) { int amountCollections = GC.CollectionCount(i); if (lastAmountGarbageCollects[i] != amountCollections) { lastAmountGarbageCollects[i] = amountCollections; AddEvent(garbageCollectColors[i], i); } } pSprite timeBar = timeBars[TimeBarIndex]; int currentHeight = HEIGHT; for (int i = 0; i <= (int)FrameTimeType.Empty; i++) { currentHeight = addArea((FrameTimeType)i, currentHeight); } ((TextureGlSingle)timeBar.Texture.TextureGl).SetData(textureData, new Rectangle(TimeBarX, 0, 1, HEIGHT)); timeBar.Texture.TextureGl.Upload(); timeBars[TimeBarIndex].MoveToX((WIDTH - TimeBarX) / GameBase.WindowManager.Ratio, 0); timeBars[(TimeBarIndex + 1) % timeBars.Length].MoveToX(-TimeBarX / GameBase.WindowManager.Ratio, 0); currentX = (currentX + 1) % (timeBars.Length * WIDTH); for (int i = 0; i < eventSprites.Count; ++i) { pSprite e = eventSprites[i]; e.Position.X -= 1 / GameBase.WindowManager.Ratio; if (e.Position.X < -2) { e.AlwaysDraw = false; e.FadeOut(0); eventSprites.RemoveAt(i--); } } }
public void Hide() { Visible = false; if (Sprites != null) { spriteBackground.FadeOut(200); spriteForeground.FadeOut(200); spriteInfo.FadeOut(200); spriteStatus.FadeOut(200); spriteName.FadeOut(200); spriteAvatar.FadeOut(200); } }
private void GlowCatcherRed() { pSprite catcher1a = new pSprite(catcher1.Texture, Fields.Gamefield, Origins.Centre, Clocks.Game, catcher1.Position + new Vector2(0, catcher1.DrawHeight * 0.18f), 0.84f, false, SkinManager.CurrentFruitsSkin.ColourHyperDashAfterImage); catcher1a.FlipHorizontal = catcher1.FlipHorizontal; catcher1a.Additive = true; catcher1a.Scale = 0.71f; catcher1a.FadeOut(1200); catcher1a.Transformations.Add(new Transformation(TransformationType.Scale, catcher1a.Scale, catcher1a.Scale * 1.2f, GameBase.Time, GameBase.Time + 1200, EasingTypes.In)); hitObjectManager.spriteManager.Add(catcher1a); }
private void s_HoverLost(object sender, EventArgs e) { pSprite p = sender as pSprite; if (p.Tag == null) { return; } pSprite p2 = ((pSprite)p.Tag); p2.Transformations.Clear(); p2.Transformations.AddRange(p.Transformations); p2.FadeOut(300); }
internal override void UpdateInput() { if (GameBase.SixtyFramesPerSecondFrame) { if ((!InputManager.ReplayMode && KeyboardHandler.IsKeyDown(BindingManager.For(Bindings.OsuSmoke))) || (InputManager.ReplayMode && InputManager.CurrentReplayFrame != null && (InputManager.CurrentReplayFrame.buttonState & pButtonState.Smoke) > 0)) { float distance = lastSmokeSprite != null?Vector2.Distance(lastSmokeSprite.Position, InputManager.CursorPosition) : 0; float acceptedWidth = Math.Max(2, lastSmokeSprite != null ? (lastSmokeSprite.DrawWidth * 0.625f * GameBase.WindowManager.Ratio) / 4f : 0); int steps = Math.Max(1, (int)(distance / acceptedWidth)); Vector2 end = InputManager.CursorPosition; if (lastSmokeSprite == null || lastSmokeSprite.Position != end) { Vector2 start = lastSmokeSprite != null ? lastSmokeSprite.Position + Vector2.Normalize(end - lastSmokeSprite.Position) * Math.Min(distance, acceptedWidth) : InputManager.CursorPosition; for (int j = 0; j < steps; j++) { pSprite smoke = new pSprite(t_smoke, Fields.NativeStandardScale, Origins.Centre, Clocks.Game, Vector2.Lerp(start, end, (float)j / steps), 1, false, Color.White); smoke.Additive = true; smoke.Alpha = 0.6f; smoke.Scale = 0.5f; smoke.Rotation = RNG.NextSingle(10f); smoke.RotateTo(smoke.Rotation + RNG.NextSingle(-0.25f, 0.25f), 500, EasingTypes.Out); smoke.ScaleTo(smoke.Scale * 1f, 2000, EasingTypes.Out); smoke.FadeOut(4000); player.spriteManagerBelowHitObjectsWidescreen.Add(smoke); lastSmokeTrailLength.Add(smoke); lastSmokeSprite = smoke; } } if (lastSmokeTrailLength.Count > 50 && Vector2.Distance(lastSmokeSprite.Position, lastSmokeTrailLength[0].Position) < 10) { endTrail(); } } else { endTrail(); lastSmokeSprite = null; } } base.UpdateInput(); }
private void Explode(HitObject h) { if (ModManager.CheckActive(Mods.Cinema)) { return; } float explosionOffset = OsuMathHelper.Clamp(((HitCircleFruits)h).CatchOffset.X, -catcherWidthHalf + catchMargin * 3, catcherWidthHalf - catchMargin * 3); if (!(h is HitCircleFruitsTick)) { float scale = OsuMathHelper.Clamp(ComboCounter.HitCombo / 200f, 0.35f, 1.125f); pSprite exp1 = new pSprite(TextureManager.Load(@"scoreboard-explosion-2", SkinSource.Osu), Fields.Gamefield, Origins.CentreLeft, Clocks.Game, h.Position, 0.99f, false, h.Colour); exp1.Additive = true; exp1.Rotation = (float)(-Math.PI / 2); exp1.FadeOut(300); exp1.Transformations.Add(new Transformation(TransformationType.VectorScale, new Vector2(1, 0.9f), new Vector2(16 * scale, 1.1f), GameBase.Time, GameBase.Time + 160, EasingTypes.Out)); spriteManagerAdd.Add(exp1); exp1.IsVisible = true; exp1.InitialPosition = new Vector2(explosionOffset, 0); caughtSprites.Add(exp1); } pSprite exp2 = new pSprite(TextureManager.Load(@"scoreboard-explosion-1", SkinSource.Osu), Fields.Gamefield, Origins.CentreLeft, Clocks.Game, h.Position, 1, false, h.Colour); exp2.Rotation = (float)(-Math.PI / 2); spriteManagerAdd.Add(exp2); exp2.Additive = true; exp2.FadeOut(700); exp2.Transformations.Add(new Transformation(TransformationType.VectorScale, new Vector2(0.9f, 1), new Vector2(0.9f, 1.3f), GameBase.Time, GameBase.Time + 500, EasingTypes.Out)); exp2.IsVisible = true; exp2.InitialPosition = new Vector2(explosionOffset, 0); caughtSprites.Add(exp2); }
private void leaveDifficultySelection(object sender, EventArgs args) { Player.Beatmap = null; bmi = null; touchingBegun = false; velocity = 0; State = SelectState.SongSelect; InitializeBgm(); GameBase.Scheduler.Add(delegate { background.FadeColour(new Color4(56, 56, 56, 255), 200); if (SelectedPanel != null) { SelectedPanel.ShowRankings(); SelectedPanel.s_BackingPlate2.FadeColour(Color4.Transparent, 150); } foreach (BeatmapPanel p in panels) { p.s_BackingPlate.HandleInput = true; foreach (pDrawable d in p.Sprites) { d.FadeIn(500); } } spriteManagerDifficultySelect.FadeOut(250); s_Header.Transform(new TransformationV(s_Header.Position, Vector2.Zero, Clock.ModeTime, Clock.ModeTime + 500, EasingTypes.In)); s_Header.Transform(new TransformationF(TransformationType.Rotation, s_Header.Rotation, 0, Clock.ModeTime, Clock.ModeTime + 500, EasingTypes.In)); if (s_SongInfo != null) { s_SongInfo.FadeOut(250); } footerHide(); }, true); }
internal void ClearBackground(bool triggerEvent = true) { showBackground = false; if (BackgroundSprite == null) { return; } BackgroundSprite.AlwaysDraw = false; BackgroundSprite.FadeOut(250); BackgroundSprite = null; if (triggerEvent && OnBackgroundChanged != null) { OnBackgroundChanged(); } }
internal virtual bool Reorder(bool instant) { Entries.Sort(); bool posChange = false; if (trackingEntry != null) { int trackingPos = Entries.IndexOf(trackingEntry); bool rightAligned = trackingEntry.AlignedToRight || DisplayOnRight; float vectorScaleSign = rightAligned ? -1 : 1; if (trackingPos < lastTrackingPos) { trackingEntry.SpriteBackground.FlashColour(Color.White, 200); pSprite exp1 = new pSprite(TextureManager.Load(@"scoreboard-explosion-2", SkinSource.Osu), trackingEntry.SpriteBackground.Origin, trackingEntry.SpriteBackground.Position + new Vector2(0, 15), 0.99f, false, Color.White); exp1.Additive = true; exp1.FadeOut(400); exp1.Transformations.Add(new Transformation(TransformationType.VectorScale, new Vector2(vectorScaleSign, 1), new Vector2(vectorScaleSign * 16, 1.2f), GameBase.Time, GameBase.Time + 200, EasingTypes.Out)); spriteManager.Add(exp1); pSprite exp2 = new pSprite(TextureManager.Load(@"scoreboard-explosion-1", SkinSource.Osu), trackingEntry.SpriteBackground.Origin, trackingEntry.SpriteBackground.Position + new Vector2(0, 15), 1, false, Color.White); exp2.FadeOut(700); exp2.Additive = true; exp2.Transformations.Add(new Transformation(TransformationType.VectorScale, new Vector2(vectorScaleSign, 1), new Vector2(vectorScaleSign, 1.3f), GameBase.Time, GameBase.Time + 700, EasingTypes.Out)); spriteManager.Add(exp2); if (rightAligned) { exp1.FlipHorizontal = true; exp2.FlipHorizontal = true; } } posChange = trackingPos != lastTrackingPos; lastTrackingPos = trackingPos; Reposition(instant); } return(posChange); }
internal override void Update() { if (lastShow >= 0 && GameBase.Time > lastShow + autoHide) { Hide(); } if (coinsBuyButton.Hovering) { Show(); } if (coinsCount.Alpha == 1) { if (count != visibleCount) { if (count > visibleCount) { visibleCount++; } else { AudioEngine.PlaySample(@"coins-use"); pSprite coin = coinSingular.Clone(); coin.Position = new Vector2(GameBase.WindowManager.WidthScaled / 2, 35); coin.Scale = 0.5f; coin.Depth = 0.5f; coin.FadeOut(1000); spriteManager.Add(coin); physics.Add(coin); visibleCount--; } coinsCount.Text = visibleCount.ToString(GameBase.nfi); coinsCount.TextColour = visibleCount > 0 ? Color.Gray : Color.Red; Show(); } } base.Update(); physics.Update(); }
internal virtual void SlideOut() { s_barFill.FadeOut(500); s_barBg.FadeOut(500); s_kiIcon.FadeOut(500); if (lastExplode != null) { lastExplode.FadeOut(50); } Vector2 off = new Vector2(0, 20); s_barFill.MoveTo(s_barFill.InitialPosition - off, 500); s_barBg.MoveTo(s_barBg.InitialPosition - off, 500); s_kiIcon.InitialPosition = new Vector2(s_kiIcon.Position.X, s_kiIcon.InitialPosition.Y); s_kiIcon.Transformations.Add(new Transformation(TransformationType.Scale, 1, 1.6f, GameBase.Time, GameBase.Time + 500)); }
private void Hide() { if (lastShow < 0) { return; } lastShow = -1; spriteManager.SpriteList.ForEach(s => { s.MoveToRelative(new Vector2(0, -35), 500, EasingTypes.In); }); coinsFg.FadeOut(300); coinsCount.FadeOut(300); coinsBuyButton.FadeOut(300); GameBase.Scheduler.AddDelayed(delegate { coinsBg.FadeOut(300); }, 200); }
internal void Hide() { if (!m_visible) { return; } foreach (pSprite p in Sprites) { p.Transformations.Clear(); p.FadeOut(100); } Background.HandleInput = false; Background.Transformations.Clear(); Background.FadeOut(100); m_visible = false; }
internal static void DoOnGamePress() { if (ConfigManager.sCursorRipple && (GameBase.Mode != OsuModes.Play || !ModManager.CheckActive(Mods.Cinema)) && (Player.Instance == null || !Player.Instance.HideMouse)) { pTexture ripple = TextureManager.Load(@"cursor-ripple"); if (ripple == null) { ripple = TextureManager.Load(@"menu-osu-shockwave", SkinSource.Osu); } pSprite rippleSprite = new pSprite(ripple, Fields.Native, Origins.Centre, Clocks.Game, InputManager.CursorPosition, 0.2F, false, Color.White); rippleSprite.Additive = true; rippleSprite.Alpha = 0.2f; rippleSprite.FadeOut(700); rippleSprite.Transformations.Add(new Transformation(TransformationType.Scale, 0.05f, 0.5f, GameBase.Time, GameBase.Time + 700, EasingTypes.Out)); GameBase.spriteManagerOverlay.Add(rippleSprite); } InputManager.TriggerEvent(InputEventType.OnGamePress); }
public void Draw(GameTime gameTime) { if (Visible) { GameBase.primitiveBatch.Begin(PrimitiveType.LineList); GameBase.primitiveBatch.AddVertex( GameBase.WindowRatioApply(position), lineColour); GameBase.primitiveBatch.AddVertex( GameBase.WindowRatioApply(position + new Vector2(length, 0)), lineColour); GameBase.primitiveBatch.End(); } if (Visible && !seekbar1.IsVisible) { seekbar1.FadeIn(200); } else if (!Visible && seekbar1.IsVisible) { seekbar1.FadeOut(200); } }
private void osuLogo_OnClick(object sender, EventArgs e) { State = MenuState.Select; osuLogo.HandleInput = false; osuLogo.Transformations.Clear(); AudioEngine.PlaySample(OsuSamples.MenuHit); menuBackgroundNew.BeAwesome(); Transformation fadeIn = new TransformationF(TransformationType.Fade, 0, 0.98f, Clock.ModeTime + 1300, Clock.ModeTime + 1700); osuLogoSmall.Transform(fadeIn); Transformation move = new TransformationV(new Vector2(0, 50), Vector2.Zero, Clock.ModeTime + 500, Clock.ModeTime + 1000, EasingTypes.In); fadeIn = new TransformationF(TransformationType.Fade, 0, 0.98f, Clock.ModeTime + 500, Clock.ModeTime + 1000); NewsButton.Transform(fadeIn); NewsButton.Transform(move); osuLogo.Transformations.Clear(); osuLogo.Transform(new TransformationF(TransformationType.Scale, osuLogo.ScaleScalar, osuLogo.ScaleScalar * 2.4f, Clock.ModeTime, Clock.ModeTime + 1300, EasingTypes.InDouble)); osuLogo.Transform(new TransformationF(TransformationType.Rotation, osuLogo.Rotation, 0.35f, Clock.ModeTime, Clock.ModeTime + 1000, EasingTypes.In)); osuLogoGloss.Transformations.Clear(); osuLogoGloss.FadeOut(200); osuLogoGloss.Transform(new TransformationF(TransformationType.Scale, osuLogoGloss.ScaleScalar, osuLogoGloss.ScaleScalar * 2.4f, Clock.ModeTime, Clock.ModeTime + 1300, EasingTypes.InDouble)); stream.FadeOut(150); additiveStream.FadeOut(150); osuLogo.FadeOut(800); explosions.ForEach(s => { s.Transformations.Clear(); s.FadeOut(100); }); }
internal override void AddMeter(HitObject h, int?customDelta) { float error = customDelta ?? AudioEngine.Time - h.StartTime; nextFadeTime = AudioEngine.Time + fade_delay; Show(); if (error < 0) { error = Math.Max(error, -ErrorRange); } else { error = Math.Min(error, ErrorRange); } float pos = error / ErrorRange * (Width / 2); floatingError = floatingError * 0.8f + pos * 0.2f; arrow.MoveTo(new Vector2(CentrePosition.X + floatingError, arrow.InitialPosition.Y), 800, EasingTypes.Out); error = Math.Abs(error); const float width = 3; pSprite a = centre.Clone(); a.Clock = Clocks.AudioOnce; a.AlwaysDraw = false; a.Depth = 0.85f; a.InitialColour = error < hitObjectManager.HitWindow300 ? colour300 : (error < hitObjectManager.HitWindow100 ? colour100 : colour50); a.Position.X = CentrePosition.X + pos; a.VectorScale.X = width; a.Alpha = 0.4f; a.Additive = true; a.FadeOut(10000); spriteManager.Add(a); }