1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00
osu-lazer/osu.Game/Rulesets/Mods/ModCinema.cs

42 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics.Sprites;
2018-04-13 17:19:50 +08:00
using osu.Game.Graphics;
2019-11-24 01:32:16 +08:00
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Rulesets.Mods
{
2019-11-24 01:32:16 +08:00
public abstract class ModCinema<T> : ModCinema, IApplicableToDrawableRuleset<T>
where T : HitObject
{
public virtual void ApplyToDrawableRuleset(DrawableRuleset<T> drawableRuleset)
{
drawableRuleset.SetReplayScore(CreateReplayScore(drawableRuleset.Beatmap));
drawableRuleset.Playfield.AlwaysPresent = true;
drawableRuleset.Playfield.Hide();
}
}
public class ModCinema : ModAutoplay, IApplicableToHUD, IApplicableToScreen
2018-04-13 17:19:50 +08:00
{
public override string Name => "Cinema";
public override string Acronym => "CN";
public override IconUsage Icon => OsuIcon.ModCinema;
2018-04-13 17:19:50 +08:00
public override string Description => "Watch the video without visual distractions.";
2019-11-24 01:32:16 +08:00
public void ApplyToHUD(HUDOverlay overlay)
{
overlay.AlwaysPresent = true;
overlay.Hide();
}
public bool EnableDim => false;
public bool ForceVideo => true;
public bool ForceStoryboard => true;
2018-04-13 17:19:50 +08:00
}
}