mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Add ruleset templates structure
This commit is contained in:
@ -0,0 +1,48 @@
|
||||
// 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.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.EmptyScrolling.Objects.Drawables
|
||||
{
|
||||
public class DrawableEmptyScrollingHitObject : DrawableHitObject<EmptyScrollingHitObject>
|
||||
{
|
||||
public DrawableEmptyScrollingHitObject(EmptyScrollingHitObject hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
Size = new Vector2(40);
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
// todo: add visuals.
|
||||
}
|
||||
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
{
|
||||
if (timeOffset >= 0)
|
||||
// todo: implement judgement logic
|
||||
ApplyResult(r => r.Type = HitResult.Perfect);
|
||||
}
|
||||
|
||||
protected override void UpdateHitStateTransforms(ArmedState state)
|
||||
{
|
||||
const double duration = 1000;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(duration, Easing.OutQuint).Expire();
|
||||
break;
|
||||
|
||||
case ArmedState.Miss:
|
||||
|
||||
this.FadeColour(Color4.Red, duration);
|
||||
this.FadeOut(duration, Easing.InQuint).Expire();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
// 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.
|
||||
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.EmptyScrolling.Objects
|
||||
{
|
||||
public class EmptyScrollingHitObject : HitObject
|
||||
{
|
||||
public override Judgement CreateJudgement() => new Judgement();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user