1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:35:35 +08:00

Move drawable timing changes to Timing/Drawables.

This commit is contained in:
smoogipooo 2017-06-01 15:13:52 +09:00
parent 3e2aa26722
commit d30706f640
9 changed files with 51 additions and 33 deletions

View File

@ -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
{

View File

@ -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
}
}
}

View File

@ -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);
}
}
}

View File

@ -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
}
}
}

View File

@ -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
{

View File

@ -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
{

View File

@ -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;

View File

@ -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
{

View File

@ -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>