mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Move drawable timing changes to Timing/Drawables.
This commit is contained in:
parent
3e2aa26722
commit
d30706f640
@ -15,6 +15,7 @@ using osu.Framework.Configuration;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawables;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
|
@ -0,0 +1,25 @@
|
||||
using osu.Framework.Physics;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Timing.Drawables
|
||||
{
|
||||
public class DrawableGravityTimingChange : DrawableTimingChange
|
||||
{
|
||||
private const float acceleration = 9.8f;
|
||||
private const float terminal_velocity = 50f;
|
||||
|
||||
private RigidBodySimulation sim;
|
||||
|
||||
public DrawableGravityTimingChange(TimingChange timingChange)
|
||||
: base(timingChange)
|
||||
{
|
||||
sim = new RigidBodySimulation(Content);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// Todo: Gravity calculations here
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
namespace osu.Game.Rulesets.Mania.Timing.Drawables
|
||||
{
|
||||
public class DrawableScrollingTimingChange : DrawableTimingChange
|
||||
{
|
||||
public DrawableScrollingTimingChange(TimingChange timingChange)
|
||||
: base(timingChange)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
Content.Y = (float)(TimingChange.Time - Time.Current);
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Timing
|
||||
namespace osu.Game.Rulesets.Mania.Timing.Drawables
|
||||
{
|
||||
public abstract class DrawableTimingChange : Container<DrawableHitObject>
|
||||
{
|
||||
@ -79,34 +79,4 @@ namespace osu.Game.Rulesets.Mania.Timing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DrawableScrollingTimingChange : DrawableTimingChange
|
||||
{
|
||||
public DrawableScrollingTimingChange(TimingChange timingChange)
|
||||
: base(timingChange)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
Content.Y = (float)(TimingChange.Time - Time.Current);
|
||||
}
|
||||
}
|
||||
|
||||
public class DrawableGravityTimingChange : DrawableTimingChange
|
||||
{
|
||||
public DrawableGravityTimingChange(TimingChange timingChange)
|
||||
: base(timingChange)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// Todo: Gravity calculations here
|
||||
}
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ using OpenTK;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Timing
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Mania.Judgements;
|
||||
using System;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Mania.Scoring;
|
||||
using osu.Game.Rulesets.Mania.Timing;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawable;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
@ -22,6 +22,7 @@ using osu.Framework.Input;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Mania.Timing.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
|
@ -83,7 +83,9 @@
|
||||
<Compile Include="ManiaRuleset.cs" />
|
||||
<Compile Include="Mods\ManiaMod.cs" />
|
||||
<Compile Include="UI\SpecialColumnPosition.cs" />
|
||||
<Compile Include="Timing\DrawableTimingChange.cs" />
|
||||
<Compile Include="Timing\Drawables\DrawableGravityTimingChange.cs" />
|
||||
<Compile Include="Timing\Drawables\DrawableScrollingTimingChange.cs" />
|
||||
<Compile Include="Timing\Drawables\DrawableTimingChange.cs" />
|
||||
<Compile Include="Timing\TimingChange.cs" />
|
||||
<Compile Include="Timing\TimingChangeContainer.cs" />
|
||||
</ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user