mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge branch 'refs/heads/master' into better-anchors
# Conflicts: # osu.Game.Mode.Osu/UI/OsuComboCounter.cs # osu.Game.Mode.Osu/UI/OsuScoreOverlay.cs
This commit is contained in:
@ -3,9 +3,9 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes.Objects;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Modes.Objects;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
@ -48,6 +48,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
new Color4(121,9,13, 255),
|
||||
};
|
||||
|
||||
if (colours.Count == 0) return;
|
||||
|
||||
int i = -1;
|
||||
|
||||
foreach (HitObject h in b.HitObjects)
|
||||
|
@ -5,10 +5,11 @@ using System.IO;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Beatmaps.Events;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
@ -220,7 +221,9 @@ namespace osu.Game.Beatmaps.Formats
|
||||
BaseDifficulty = new BaseDifficulty(),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
HitObjectParser parser = null;
|
||||
|
||||
var section = Section.None;
|
||||
string line;
|
||||
while (true)
|
||||
@ -232,14 +235,14 @@ namespace osu.Game.Beatmaps.Formats
|
||||
continue;
|
||||
if (line.StartsWith(@"osu file format v"))
|
||||
continue;
|
||||
|
||||
|
||||
if (line.StartsWith(@"[") && line.EndsWith(@"]"))
|
||||
{
|
||||
if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section))
|
||||
throw new InvalidDataException($@"Unknown osu section {line}");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
string val = line, key = null;
|
||||
if (section != Section.Events && section != Section.TimingPoints && section != Section.HitObjects)
|
||||
{
|
||||
@ -250,6 +253,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
case Section.General:
|
||||
handleGeneral(beatmap, key, val);
|
||||
parser = Ruleset.GetRuleset(beatmap.BeatmapInfo.Mode).CreateHitObjectParser();
|
||||
break;
|
||||
case Section.Editor:
|
||||
handleEditor(beatmap, key, val);
|
||||
@ -270,13 +274,13 @@ namespace osu.Game.Beatmaps.Formats
|
||||
handleColours(beatmap, key, val);
|
||||
break;
|
||||
case Section.HitObjects:
|
||||
var h = HitObject.Parse(beatmap.BeatmapInfo.Mode, val);
|
||||
if (h != null)
|
||||
beatmap.HitObjects.Add(h);
|
||||
var obj = parser?.Parse(val);
|
||||
if (obj != null)
|
||||
beatmap.HitObjects.Add(obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return beatmap;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch
|
||||
{
|
||||
public abstract class CatchBaseHit : HitObject
|
||||
{
|
||||
public float Position;
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects.Catch;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch
|
||||
{
|
||||
class CatchConverter : HitObjectConverter<CatchBaseHit>
|
||||
{
|
||||
public override List<CatchBaseHit> Convert(List<HitObject> input)
|
||||
{
|
||||
List<CatchBaseHit> output = new List<CatchBaseHit>();
|
||||
|
||||
foreach (HitObject i in input)
|
||||
{
|
||||
CatchBaseHit h = i as CatchBaseHit;
|
||||
|
||||
if (h == null)
|
||||
{
|
||||
OsuBaseHit o = i as OsuBaseHit;
|
||||
|
||||
if (o == null) throw new HitObjectConvertException(@"Catch", i);
|
||||
|
||||
h = new Fruit
|
||||
{
|
||||
StartTime = o.StartTime,
|
||||
Position = o.Position.X,
|
||||
};
|
||||
}
|
||||
|
||||
output.Add(h);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch.Drawable
|
||||
{
|
||||
class DrawableFruit : Sprite
|
||||
{
|
||||
private CatchBaseHit h;
|
||||
|
||||
public DrawableFruit(CatchBaseHit h)
|
||||
{
|
||||
this.h = h;
|
||||
|
||||
Origin = Anchor.Centre;
|
||||
Scale = new Vector2(0.1f);
|
||||
RelativePositionAxes = Axes.Y;
|
||||
Position = new Vector2(h.Position, -0.1f);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo");
|
||||
|
||||
Transforms.Add(new TransformPosition { StartTime = h.StartTime - 200, EndTime = h.StartTime, StartValue = new Vector2(h.Position, -0.1f), EndValue = new Vector2(h.Position, 0.9f) });
|
||||
Transforms.Add(new TransformAlpha { StartTime = h.StartTime + h.Duration + 200, EndTime = h.StartTime + h.Duration + 400, StartValue = 1, EndValue = 0 });
|
||||
Expire(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch
|
||||
{
|
||||
public class Droplet : CatchBaseHit
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch
|
||||
{
|
||||
public class Fruit : CatchBaseHit
|
||||
{
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania.Drawable
|
||||
{
|
||||
public class DrawableNote : Sprite
|
||||
{
|
||||
private readonly ManiaBaseHit note;
|
||||
|
||||
public DrawableNote(ManiaBaseHit note)
|
||||
{
|
||||
this.note = note;
|
||||
Origin = Anchor.Centre;
|
||||
Scale = new Vector2(0.1f);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo");
|
||||
|
||||
Transforms.Add(new TransformPositionY() { StartTime = note.StartTime - 200, EndTime = note.StartTime, StartValue = -0.1f, EndValue = 0.9f });
|
||||
Transforms.Add(new TransformAlpha() { StartTime = note.StartTime + note.Duration + 200, EndTime = note.StartTime + note.Duration + 400, StartValue = 1, EndValue = 0 });
|
||||
Expire(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania
|
||||
{
|
||||
public abstract class ManiaBaseHit : HitObject
|
||||
{
|
||||
public int Column;
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania
|
||||
{
|
||||
class ManiaConverter : HitObjectConverter<ManiaBaseHit>
|
||||
{
|
||||
private readonly int columns;
|
||||
|
||||
public ManiaConverter(int columns)
|
||||
{
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
public override List<ManiaBaseHit> Convert(List<HitObject> input)
|
||||
{
|
||||
List<ManiaBaseHit> output = new List<ManiaBaseHit>();
|
||||
|
||||
foreach (HitObject i in input)
|
||||
{
|
||||
ManiaBaseHit h = i as ManiaBaseHit;
|
||||
|
||||
if (h == null)
|
||||
{
|
||||
OsuBaseHit o = i as OsuBaseHit;
|
||||
|
||||
if (o == null) throw new HitObjectConvertException(@"Mania", i);
|
||||
|
||||
h = new Note
|
||||
{
|
||||
StartTime = o.StartTime,
|
||||
Column = (int)Math.Round(o.Position.X / 512 * columns)
|
||||
};
|
||||
}
|
||||
|
||||
output.Add(h);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania
|
||||
{
|
||||
public class Note : ManiaBaseHit
|
||||
{
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu
|
||||
{
|
||||
public class Circle : OsuBaseHit
|
||||
{
|
||||
}
|
||||
}
|
@ -1,337 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.MathUtils;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu.Drawable
|
||||
{
|
||||
public class DrawableCircle : DrawableHitObject
|
||||
{
|
||||
private Sprite approachCircle;
|
||||
private CircleLayer circle;
|
||||
private RingLayer ring;
|
||||
private FlashLayer flash;
|
||||
private ExplodeLayer explode;
|
||||
private NumberLayer number;
|
||||
private GlowLayer glow;
|
||||
private OsuBaseHit h;
|
||||
|
||||
public DrawableCircle(Circle h) : base(h)
|
||||
{
|
||||
this.h = h;
|
||||
|
||||
Origin = Anchor.Centre;
|
||||
RelativePositionAxes = Axes.Both;
|
||||
Position = new Vector2(h.Position.X / 512, h.Position.Y / 384);
|
||||
|
||||
Children = new Framework.Graphics.Drawable[]
|
||||
{
|
||||
glow = new GlowLayer
|
||||
{
|
||||
Colour = h.Colour
|
||||
},
|
||||
circle = new CircleLayer
|
||||
{
|
||||
Colour = h.Colour,
|
||||
Hit = Hit,
|
||||
},
|
||||
number = new NumberLayer(),
|
||||
ring = new RingLayer(),
|
||||
flash = new FlashLayer(),
|
||||
explode = new ExplodeLayer
|
||||
{
|
||||
Colour = h.Colour,
|
||||
},
|
||||
approachCircle = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = h.Colour
|
||||
}
|
||||
};
|
||||
|
||||
//may not be so correct
|
||||
Size = circle.DrawSize;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BaseGame game)
|
||||
{
|
||||
approachCircle.Texture = game.Textures.Get(@"Play/osu/approachcircle@2x");
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
//force application of the state that was set before we loaded.
|
||||
UpdateState(State);
|
||||
}
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
if (!IsLoaded) return;
|
||||
|
||||
Flush(true); //move to DrawableHitObject
|
||||
|
||||
double t = HitTime ?? h.StartTime;
|
||||
|
||||
//sane defaults
|
||||
ring.Alpha = circle.Alpha = number.Alpha = approachCircle.Alpha = glow.Alpha = 1;
|
||||
explode.Alpha = 0;
|
||||
Scale = Vector2.One;
|
||||
|
||||
//always-present transforms
|
||||
Transforms.Add(new TransformAlpha { StartTime = t - 1000, EndTime = t - 800, StartValue = 0, EndValue = 1 });
|
||||
approachCircle.Transforms.Add(new TransformScale { StartTime = t - 1000, EndTime = t, StartValue = new Vector2(2f), EndValue = new Vector2(0.6f) });
|
||||
|
||||
//set transform delay to t==hitTime
|
||||
Delay(t - Time.Current, true);
|
||||
|
||||
approachCircle.FadeOut();
|
||||
glow.FadeOut(400);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Disarmed:
|
||||
Delay(h.Duration + 200);
|
||||
FadeOut(200);
|
||||
break;
|
||||
case ArmedState.Armed:
|
||||
const double flash_in = 30;
|
||||
|
||||
flash.FadeTo(0.8f, flash_in);
|
||||
flash.Delay(flash_in);
|
||||
flash.FadeOut(100);
|
||||
|
||||
explode.FadeIn(flash_in);
|
||||
|
||||
Delay(flash_in, true);
|
||||
|
||||
//after the flash, we can hide some elements that were behind it
|
||||
ring.FadeOut();
|
||||
circle.FadeOut();
|
||||
number.FadeOut();
|
||||
|
||||
FadeOut(800);
|
||||
ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private class NumberLayer : Container
|
||||
{
|
||||
private Sprite number;
|
||||
|
||||
public NumberLayer()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
number = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Alpha = 1
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
number.Texture = textures.Get(@"Play/osu/number@2x");
|
||||
}
|
||||
}
|
||||
|
||||
private class GlowLayer : Container
|
||||
{
|
||||
private Sprite layer;
|
||||
|
||||
public GlowLayer()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
layer = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
Alpha = 0.5f
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
layer.Texture = textures.Get(@"Play/osu/ring-glow@2x");
|
||||
}
|
||||
}
|
||||
|
||||
private class RingLayer : Container
|
||||
{
|
||||
private Sprite ring;
|
||||
|
||||
public RingLayer()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Children = new Framework.Graphics.Drawable[]
|
||||
{
|
||||
ring = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
ring.Texture = textures.Get(@"Play/osu/ring@2x");
|
||||
}
|
||||
}
|
||||
|
||||
private class FlashLayer : Container
|
||||
{
|
||||
public FlashLayer()
|
||||
{
|
||||
Size = new Vector2(144);
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = Size.X / 2;
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
BlendingMode = BlendingMode.Additive;
|
||||
Alpha = 0;
|
||||
|
||||
Children = new Framework.Graphics.Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private class ExplodeLayer : Container
|
||||
{
|
||||
public ExplodeLayer()
|
||||
{
|
||||
Size = new Vector2(144);
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
BlendingMode = BlendingMode.Additive;
|
||||
Alpha = 0;
|
||||
|
||||
Children = new Framework.Graphics.Drawable[]
|
||||
{
|
||||
new Triangles
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private class CircleLayer : Container
|
||||
{
|
||||
|
||||
private Sprite disc;
|
||||
private Triangles triangles;
|
||||
|
||||
public Func<bool> Hit;
|
||||
|
||||
public CircleLayer()
|
||||
{
|
||||
Size = new Vector2(144);
|
||||
Masking = true;
|
||||
CornerRadius = DrawSize.X / 2;
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Children = new Framework.Graphics.Drawable[]
|
||||
{
|
||||
disc = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
},
|
||||
triangles = new Triangles
|
||||
{
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
disc.Texture = textures.Get(@"Play/osu/disc@2x");
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
Hit?.Invoke();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private class Triangles : Container
|
||||
{
|
||||
private Texture tex;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
tex = textures.Get(@"Play/osu/triangle@2x");
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Add(new Sprite
|
||||
{
|
||||
Texture = tex,
|
||||
Origin = Anchor.Centre,
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Position = new Vector2(RNG.NextSingle(), RNG.NextSingle()),
|
||||
Scale = new Vector2(RNG.NextSingle() * 0.4f + 0.2f),
|
||||
Alpha = RNG.NextSingle() * 0.3f
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
foreach (Framework.Graphics.Drawable d in Children)
|
||||
d.Position -= new Vector2(0, (float)(d.Scale.X * (Time.Elapsed / 2880)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu
|
||||
{
|
||||
public abstract class OsuBaseHit : HitObject
|
||||
{
|
||||
public Vector2 Position { get; set; }
|
||||
|
||||
public static OsuBaseHit Parse(string val)
|
||||
{
|
||||
string[] split = val.Split(',');
|
||||
var type = (HitObjectType)int.Parse(split[3]);
|
||||
bool combo = type.HasFlag(HitObjectType.NewCombo);
|
||||
type &= (HitObjectType)0xF;
|
||||
type &= ~HitObjectType.NewCombo;
|
||||
OsuBaseHit result;
|
||||
switch (type)
|
||||
{
|
||||
case HitObjectType.Circle:
|
||||
result = new Circle();
|
||||
break;
|
||||
case HitObjectType.Slider:
|
||||
result = new Slider();
|
||||
break;
|
||||
case HitObjectType.Spinner:
|
||||
result = new Spinner();
|
||||
break;
|
||||
default:
|
||||
throw new InvalidOperationException($@"Unknown hit object type {type}");
|
||||
}
|
||||
result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
|
||||
result.StartTime = double.Parse(split[2]);
|
||||
result.Sample = new HitSampleInfo { Type = (SampleType)int.Parse(split[4]) };
|
||||
result.NewCombo = combo;
|
||||
// TODO: "addition" field
|
||||
return result;
|
||||
}
|
||||
|
||||
[Flags]
|
||||
private enum HitObjectType
|
||||
{
|
||||
Circle = 1,
|
||||
Slider = 2,
|
||||
NewCombo = 4,
|
||||
CircleNewCombo = 5,
|
||||
SliderNewCombo = 6,
|
||||
Spinner = 8,
|
||||
ColourHax = 122,
|
||||
Hold = 128,
|
||||
ManiaLong = 128,
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu
|
||||
{
|
||||
class OsuConverter : HitObjectConverter<OsuBaseHit>
|
||||
{
|
||||
public override List<OsuBaseHit> Convert(List<HitObject> input)
|
||||
{
|
||||
List<OsuBaseHit> output = new List<OsuBaseHit>();
|
||||
|
||||
foreach (HitObject h in input)
|
||||
output.Add(h as OsuBaseHit);
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu
|
||||
{
|
||||
public class Slider : OsuBaseHit
|
||||
{
|
||||
public List<Vector2> Path;
|
||||
|
||||
public int RepeatCount;
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Osu
|
||||
{
|
||||
public class Spinner : OsuBaseHit
|
||||
{
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Taiko.Drawable
|
||||
{
|
||||
class DrawableTaikoHit : Sprite
|
||||
{
|
||||
private TaikoBaseHit h;
|
||||
|
||||
public DrawableTaikoHit(TaikoBaseHit h)
|
||||
{
|
||||
this.h = h;
|
||||
|
||||
Origin = Anchor.Centre;
|
||||
Scale = new Vector2(0.2f);
|
||||
RelativePositionAxes = Axes.Both;
|
||||
Position = new Vector2(1.1f, 0.5f);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo");
|
||||
|
||||
Transforms.Add(new TransformPositionX { StartTime = h.StartTime - 200, EndTime = h.StartTime, StartValue = 1.1f, EndValue = 0.1f });
|
||||
Transforms.Add(new TransformAlpha { StartTime = h.StartTime + h.Duration + 200, EndTime = h.StartTime + h.Duration + 400, StartValue = 1, EndValue = 0 });
|
||||
Expire(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Taiko
|
||||
{
|
||||
public class TaikoBaseHit : HitObject
|
||||
{
|
||||
public float Scale = 1;
|
||||
|
||||
public TaikoColour Type;
|
||||
}
|
||||
|
||||
public enum TaikoColour
|
||||
{
|
||||
Red,
|
||||
Blue
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Taiko
|
||||
{
|
||||
class TaikoConverter : HitObjectConverter<TaikoBaseHit>
|
||||
{
|
||||
public override List<TaikoBaseHit> Convert(List<HitObject> input)
|
||||
{
|
||||
List<TaikoBaseHit> output = new List<TaikoBaseHit>();
|
||||
|
||||
foreach (HitObject i in input)
|
||||
{
|
||||
TaikoBaseHit h = i as TaikoBaseHit;
|
||||
|
||||
if (h == null)
|
||||
{
|
||||
OsuBaseHit o = i as OsuBaseHit;
|
||||
|
||||
if (o == null) throw new HitObjectConvertException(@"Taiko", i);
|
||||
|
||||
h = new TaikoBaseHit
|
||||
{
|
||||
StartTime = o.StartTime,
|
||||
};
|
||||
}
|
||||
|
||||
output.Add(h);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
@ -3,8 +3,9 @@
|
||||
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Play;
|
||||
using SQLite.Net.Attributes;
|
||||
using SQLiteNetExtensions.Attributes;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.GameModes.Play;
|
||||
using SQLite.Net.Attributes;
|
||||
|
||||
namespace osu.Game.Database
|
||||
|
@ -1,13 +0,0 @@
|
||||
using osu.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
internal class MenuVisualisation : Drawable
|
||||
{
|
||||
}
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
/// <summary>
|
||||
/// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch.
|
||||
/// </summary>
|
||||
public class CatchComboCounter : OsuComboCounter
|
||||
{
|
||||
protected override bool CanPopOutWhileRolling => true;
|
||||
|
||||
protected virtual double FadeOutDelay => 1000;
|
||||
protected override double FadeOutDuration => 300;
|
||||
|
||||
protected override string FormatCount(ulong count)
|
||||
{
|
||||
return $@"{count:#,0}";
|
||||
}
|
||||
|
||||
private void animateFade()
|
||||
{
|
||||
Show();
|
||||
Delay(FadeOutDelay);
|
||||
FadeOut(FadeOutDuration);
|
||||
DelayReset();
|
||||
}
|
||||
|
||||
protected override void OnCountChange(ulong currentValue, ulong newValue)
|
||||
{
|
||||
if (newValue != 0)
|
||||
animateFade();
|
||||
base.OnCountChange(currentValue, newValue);
|
||||
}
|
||||
|
||||
protected override void OnCountRolling(ulong currentValue, ulong newValue)
|
||||
{
|
||||
if (!IsRolling)
|
||||
{
|
||||
PopOutSpriteText.Colour = DisplayedCountSpriteText.Colour;
|
||||
FadeOut(FadeOutDuration);
|
||||
}
|
||||
base.OnCountRolling(currentValue, newValue);
|
||||
}
|
||||
|
||||
protected override void OnCountIncrement(ulong currentValue, ulong newValue)
|
||||
{
|
||||
animateFade();
|
||||
base.OnCountIncrement(currentValue, newValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Increaces counter and tints pop-out before animation.
|
||||
/// </summary>
|
||||
/// <param name="colour">Last grabbed fruit colour.</param>
|
||||
public void CatchFruit(Color4 colour)
|
||||
{
|
||||
PopOutSpriteText.Colour = colour;
|
||||
Count++;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Catch;
|
||||
using osu.Game.Beatmaps.Objects.Catch.Drawable;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
public class CatchHitRenderer : HitRenderer<CatchBaseHit>
|
||||
{
|
||||
protected override HitObjectConverter<CatchBaseHit> Converter => new CatchConverter();
|
||||
|
||||
protected override Playfield CreatePlayfield() => new CatchPlayfield();
|
||||
|
||||
protected override DrawableHitObject GetVisualRepresentation(CatchBaseHit h) => null;// new DrawableFruit(h);
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
public class CatchPlayfield : Playfield
|
||||
{
|
||||
public CatchPlayfield()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
Size = new Vector2(512, 0.9f);
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
class CatchRuleset : Ruleset
|
||||
{
|
||||
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
|
||||
|
||||
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new CatchHitRenderer { Objects = objects };
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Play.Taiko;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
/// <summary>
|
||||
/// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania.
|
||||
/// </summary>
|
||||
public class ManiaComboCounter : TaikoComboCounter
|
||||
{
|
||||
protected ushort KeysHeld = 0;
|
||||
|
||||
protected Color4 OriginalColour;
|
||||
|
||||
protected Color4 TintColour => Color4.Orange;
|
||||
protected EasingTypes TintEasing => EasingTypes.None;
|
||||
protected int TintDuration => 500;
|
||||
|
||||
protected Color4 PopOutColor => Color4.Red;
|
||||
protected override float PopOutInitialAlpha => 1.0f;
|
||||
protected override double PopOutDuration => 300;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
PopOutSpriteText.Anchor = Anchor.BottomCentre;
|
||||
PopOutSpriteText.Origin = Anchor.Centre;
|
||||
PopOutSpriteText.FadeColour(PopOutColor, 0);
|
||||
OriginalColour = DisplayedCountSpriteText.Colour;
|
||||
}
|
||||
|
||||
protected override void OnCountRolling(ulong currentValue, ulong newValue)
|
||||
{
|
||||
if (!IsRolling && newValue < currentValue)
|
||||
{
|
||||
PopOutSpriteText.Text = FormatCount(currentValue);
|
||||
|
||||
PopOutSpriteText.FadeTo(PopOutInitialAlpha);
|
||||
PopOutSpriteText.ScaleTo(1.0f);
|
||||
|
||||
PopOutSpriteText.FadeOut(PopOutDuration, PopOutEasing);
|
||||
PopOutSpriteText.ScaleTo(PopOutScale, PopOutDuration, PopOutEasing);
|
||||
}
|
||||
|
||||
base.OnCountRolling(currentValue, newValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tints text while holding a key.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Does not alter combo. This has to be done depending of the scoring system.
|
||||
/// (i.e. v1 = each period of time; v2 = when starting and ending a key hold)
|
||||
/// </remarks>
|
||||
public void HoldStart()
|
||||
{
|
||||
if (KeysHeld == 0)
|
||||
DisplayedCountSpriteText.FadeColour(TintColour, TintDuration, TintEasing);
|
||||
KeysHeld++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ends tinting.
|
||||
/// </summary>
|
||||
public void HoldEnd()
|
||||
{
|
||||
KeysHeld--;
|
||||
if (KeysHeld == 0)
|
||||
DisplayedCountSpriteText.FadeColour(OriginalColour, TintDuration, TintEasing);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Mania;
|
||||
using osu.Game.Beatmaps.Objects.Mania.Drawable;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit>
|
||||
{
|
||||
private readonly int columns;
|
||||
|
||||
public ManiaHitRenderer(int columns = 5)
|
||||
{
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
protected override HitObjectConverter<ManiaBaseHit> Converter => new ManiaConverter(columns);
|
||||
|
||||
protected override Playfield CreatePlayfield() => new ManiaPlayfield(columns);
|
||||
|
||||
protected override DrawableHitObject GetVisualRepresentation(ManiaBaseHit h)
|
||||
{
|
||||
return null;
|
||||
//return new DrawableNote(h)
|
||||
//{
|
||||
// Position = new Vector2((float)(h.Column + 0.5) / columns, -0.1f),
|
||||
// RelativePositionAxes = Axes.Both
|
||||
//};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
public class ManiaPlayfield : Playfield
|
||||
{
|
||||
private readonly int columns;
|
||||
|
||||
public ManiaPlayfield(int columns)
|
||||
{
|
||||
this.columns = columns;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(columns / 20f, 1f);
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
|
||||
for (int i = 0; i < columns; i++)
|
||||
Add(new Box()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Size = new Vector2(2, 1),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Position = new Vector2((float)i / columns, 0),
|
||||
Alpha = 0.5f,
|
||||
Colour = Color4.Black
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
class ManiaRuleset : Ruleset
|
||||
{
|
||||
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
|
||||
|
||||
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new ManiaHitRenderer { Objects = objects };
|
||||
}
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
/// <summary>
|
||||
/// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard.
|
||||
/// </summary>
|
||||
public class OsuComboCounter : ComboCounter
|
||||
{
|
||||
protected uint ScheduledPopOutCurrentId = 0;
|
||||
|
||||
protected virtual float PopOutSmallScale => 1.1f;
|
||||
protected virtual bool CanPopOutWhileRolling => false;
|
||||
|
||||
public MarginPadding InnerCountMargin
|
||||
{
|
||||
get
|
||||
{
|
||||
return DisplayedCountSpriteText.Margin;
|
||||
}
|
||||
set
|
||||
{
|
||||
DisplayedCountSpriteText.Margin = value;
|
||||
}
|
||||
}
|
||||
|
||||
public OsuComboCounter()
|
||||
{
|
||||
PopOutSpriteText.Origin = Origin;
|
||||
PopOutSpriteText.Anchor = Anchor;
|
||||
|
||||
Add(PopOutSpriteText);
|
||||
}
|
||||
|
||||
protected override string FormatCount(ulong count)
|
||||
{
|
||||
return $@"{count}x";
|
||||
}
|
||||
|
||||
protected virtual void TransformPopOut(ulong newValue)
|
||||
{
|
||||
PopOutSpriteText.Text = FormatCount(newValue);
|
||||
|
||||
PopOutSpriteText.ScaleTo(PopOutScale);
|
||||
PopOutSpriteText.FadeTo(PopOutInitialAlpha);
|
||||
PopOutSpriteText.MoveTo(Vector2.Zero);
|
||||
|
||||
PopOutSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing);
|
||||
PopOutSpriteText.FadeOut(PopOutDuration, PopOutEasing);
|
||||
PopOutSpriteText.MoveTo(DisplayedCountSpriteText.Position, PopOutDuration, PopOutEasing);
|
||||
}
|
||||
|
||||
protected virtual void TransformPopOutRolling(ulong newValue)
|
||||
{
|
||||
TransformPopOut(newValue);
|
||||
TransformPopOutSmall(newValue);
|
||||
}
|
||||
|
||||
protected virtual void TransformNoPopOut(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Text = FormatCount(newValue);
|
||||
DisplayedCountSpriteText.ScaleTo(1);
|
||||
}
|
||||
|
||||
protected virtual void TransformPopOutSmall(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Text = FormatCount(newValue);
|
||||
DisplayedCountSpriteText.ScaleTo(PopOutSmallScale);
|
||||
DisplayedCountSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing);
|
||||
}
|
||||
|
||||
protected virtual void ScheduledPopOutSmall(uint id)
|
||||
{
|
||||
// Too late; scheduled task invalidated
|
||||
if (id != ScheduledPopOutCurrentId)
|
||||
return;
|
||||
|
||||
DisplayedCount++;
|
||||
}
|
||||
|
||||
protected override void OnCountRolling(ulong currentValue, ulong newValue)
|
||||
{
|
||||
ScheduledPopOutCurrentId++;
|
||||
|
||||
// Hides displayed count if was increasing from 0 to 1 but didn't finish
|
||||
if (currentValue == 0 && newValue == 0)
|
||||
DisplayedCountSpriteText.FadeOut(FadeOutDuration);
|
||||
|
||||
base.OnCountRolling(currentValue, newValue);
|
||||
}
|
||||
|
||||
protected override void OnCountIncrement(ulong currentValue, ulong newValue)
|
||||
{
|
||||
ScheduledPopOutCurrentId++;
|
||||
|
||||
if (DisplayedCount < currentValue)
|
||||
DisplayedCount++;
|
||||
|
||||
DisplayedCountSpriteText.Show();
|
||||
|
||||
TransformPopOut(newValue);
|
||||
|
||||
uint newTaskId = ScheduledPopOutCurrentId;
|
||||
Scheduler.AddDelayed(delegate
|
||||
{
|
||||
ScheduledPopOutSmall(newTaskId);
|
||||
}, PopOutDuration);
|
||||
}
|
||||
|
||||
protected override void OnCountChange(ulong currentValue, ulong newValue)
|
||||
{
|
||||
ScheduledPopOutCurrentId++;
|
||||
|
||||
if (newValue == 0)
|
||||
DisplayedCountSpriteText.FadeOut();
|
||||
|
||||
base.OnCountChange(currentValue, newValue);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue)
|
||||
{
|
||||
if (newValue == 0)
|
||||
DisplayedCountSpriteText.FadeOut(FadeOutDuration);
|
||||
else
|
||||
DisplayedCountSpriteText.Show();
|
||||
|
||||
if (CanPopOutWhileRolling)
|
||||
TransformPopOutRolling(newValue);
|
||||
else
|
||||
TransformNoPopOut(newValue);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountChange(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1);
|
||||
|
||||
TransformNoPopOut(newValue);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountIncrement(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Show();
|
||||
|
||||
TransformPopOutSmall(newValue);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using osu.Game.Beatmaps.Objects.Osu.Drawable;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
public class OsuHitRenderer : HitRenderer<OsuBaseHit>
|
||||
{
|
||||
protected override HitObjectConverter<OsuBaseHit> Converter => new OsuConverter();
|
||||
|
||||
protected override Playfield CreatePlayfield() => new OsuPlayfield();
|
||||
|
||||
protected override DrawableHitObject GetVisualRepresentation(OsuBaseHit h)
|
||||
=> h is Circle ? new DrawableCircle(h as Circle) : null;
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
public class OsuPlayfield : Playfield
|
||||
{
|
||||
protected override Container<Drawable> Content => hitObjectContainer;
|
||||
|
||||
private Container hitObjectContainer;
|
||||
|
||||
public override Vector2 Size
|
||||
{
|
||||
get
|
||||
{
|
||||
var parentSize = Parent.DrawSize;
|
||||
var aspectSize = parentSize.X * 0.75f < parentSize.Y ? new Vector2(parentSize.X, parentSize.X * 0.75f) : new Vector2(parentSize.Y * 4f / 3f, parentSize.Y);
|
||||
|
||||
return new Vector2(aspectSize.X / parentSize.X, aspectSize.Y / parentSize.Y) * base.Size;
|
||||
}
|
||||
}
|
||||
|
||||
public OsuPlayfield()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(0.75f);
|
||||
|
||||
AddInternal(new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.5f,
|
||||
});
|
||||
|
||||
AddInternal(hitObjectContainer = new HitObjectContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
});
|
||||
}
|
||||
|
||||
class HitObjectContainer : Container
|
||||
{
|
||||
public override Vector2 ChildScale => new Vector2(0.625f);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
class OsuRuleset : Ruleset
|
||||
{
|
||||
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
|
||||
|
||||
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new OsuHitRenderer { Objects = objects };
|
||||
}}
|
@ -1,56 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using OpenTK;
|
||||
using OpenTK.Input;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
class ScoreOverlayOsu : ScoreOverlay
|
||||
{
|
||||
protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter()
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Position = new Vector2(0, 45)
|
||||
};
|
||||
|
||||
protected override ScoreCounter CreateScoreCounter() => new ScoreCounter()
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 60
|
||||
};
|
||||
|
||||
protected override ComboCounter CreateComboCounter() => new OsuComboCounter()
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
};
|
||||
|
||||
protected override KeyCounterCollection CreateKeyCounter() => new KeyCounterCollection
|
||||
{
|
||||
IsCounting = true,
|
||||
FadeTime = 50,
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding(10),
|
||||
Counters = new KeyCounter[]
|
||||
{
|
||||
new KeyCounterKeyboard(@"Z", Key.Z),
|
||||
new KeyCounterKeyboard(@"X", Key.X),
|
||||
new KeyCounterMouse(@"M1", MouseButton.Left),
|
||||
new KeyCounterMouse(@"M2", MouseButton.Right),
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.GameModes.Play.Catch;
|
||||
using osu.Game.GameModes.Play.Mania;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
using osu.Game.GameModes.Play.Taiko;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
public abstract class Ruleset
|
||||
{
|
||||
public abstract ScoreOverlay CreateScoreOverlay();
|
||||
|
||||
public abstract HitRenderer CreateHitRendererWith(List<HitObject> objects);
|
||||
|
||||
public static Ruleset GetRuleset(PlayMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
default:
|
||||
return new OsuRuleset();
|
||||
case PlayMode.Catch:
|
||||
return new CatchRuleset();
|
||||
case PlayMode.Mania:
|
||||
return new ManiaRuleset();
|
||||
case PlayMode.Taiko:
|
||||
return new TaikoRuleset();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows tint and scaling animations. Used in osu!taiko.
|
||||
/// </summary>
|
||||
public class TaikoComboCounter : ComboCounter
|
||||
{
|
||||
protected virtual int AnimationDuration => 300;
|
||||
protected virtual float ScaleFactor => 2;
|
||||
protected virtual EasingTypes AnimationEasing => EasingTypes.None;
|
||||
protected virtual bool CanAnimateWhenBackwards => false;
|
||||
|
||||
public TaikoComboCounter()
|
||||
{
|
||||
DisplayedCountSpriteText.Origin = Framework.Graphics.Anchor.BottomCentre;
|
||||
DisplayedCountSpriteText.Anchor = Framework.Graphics.Anchor.BottomCentre;
|
||||
}
|
||||
|
||||
protected virtual void TransformAnimate(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Text = FormatCount(newValue);
|
||||
DisplayedCountSpriteText.ScaleTo(new Vector2(1, ScaleFactor));
|
||||
DisplayedCountSpriteText.ScaleTo(new Vector2(1, 1), AnimationDuration, AnimationEasing);
|
||||
}
|
||||
|
||||
protected virtual void TransformNotAnimate(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Text = FormatCount(newValue);
|
||||
DisplayedCountSpriteText.ScaleTo(1);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue)
|
||||
{
|
||||
if (newValue == 0)
|
||||
DisplayedCountSpriteText.FadeOut(FadeOutDuration);
|
||||
else
|
||||
DisplayedCountSpriteText.Show();
|
||||
|
||||
TransformNotAnimate(newValue);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountChange(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1);
|
||||
|
||||
TransformNotAnimate(newValue);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedCountIncrement(ulong newValue)
|
||||
{
|
||||
DisplayedCountSpriteText.Show();
|
||||
|
||||
TransformAnimate(newValue);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Taiko;
|
||||
using osu.Game.Beatmaps.Objects.Taiko.Drawable;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
public class TaikoHitRenderer : HitRenderer<TaikoBaseHit>
|
||||
{
|
||||
protected override HitObjectConverter<TaikoBaseHit> Converter => new TaikoConverter();
|
||||
|
||||
protected override Playfield CreatePlayfield() => new TaikoPlayfield();
|
||||
|
||||
protected override DrawableHitObject GetVisualRepresentation(TaikoBaseHit h) => null;// new DrawableTaikoHit(h);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
public class TaikoPlayfield : Playfield
|
||||
{
|
||||
public TaikoPlayfield()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Size = new Vector2(1, 100);
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
|
||||
Add(new Sprite
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.2f),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Position = new Vector2(0.1f, 0.5f),
|
||||
Colour = Color4.Gray
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
class TaikoRuleset : Ruleset
|
||||
{
|
||||
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
|
||||
|
||||
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new TaikoHitRenderer { Objects = objects };
|
||||
}
|
||||
}
|
@ -2,15 +2,10 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps.Objects.Osu.Drawable;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects
|
||||
namespace osu.Game.Modes.Objects.Drawables
|
||||
{
|
||||
public abstract class DrawableHitObject : Container, IStateful<ArmedState>
|
||||
{
|
@ -1,12 +1,10 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.GameModes.Play;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects
|
||||
namespace osu.Game.Modes.Objects
|
||||
{
|
||||
/// <summary>
|
||||
/// A hitobject describes a point in a beatmap
|
||||
@ -23,17 +21,5 @@ namespace osu.Game.Beatmaps.Objects
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
public HitSampleInfo Sample;
|
||||
|
||||
public static HitObject Parse(PlayMode mode, string val)
|
||||
{
|
||||
//TODO: move to modular HitObjectParser system rather than static parsing. (https://github.com/ppy/osu/pull/60/files#r83135780)
|
||||
switch (mode)
|
||||
{
|
||||
case PlayMode.Osu:
|
||||
return OsuBaseHit.Parse(val);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -4,13 +4,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects
|
||||
namespace osu.Game.Modes.Objects
|
||||
{
|
||||
public abstract class HitObjectConverter<T>
|
||||
where T : HitObject
|
||||
{
|
||||
public abstract List<T> Convert(List<HitObject> input);
|
||||
}
|
||||
|
||||
public class HitObjectConvertException : Exception
|
||||
{
|
||||
public HitObject Input { get; }
|
@ -7,9 +7,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Charts
|
||||
namespace osu.Game.Modes.Objects
|
||||
{
|
||||
class ChartInfo : GameModeWhiteBox
|
||||
public abstract class HitObjectParser
|
||||
{
|
||||
public abstract HitObject Parse(string text);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes
|
||||
{
|
||||
public enum PlayMode
|
||||
{
|
39
osu.Game/Modes/Ruleset.cs
Normal file
39
osu.Game/Modes/Ruleset.cs
Normal file
@ -0,0 +1,39 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using System.Reflection;
|
||||
using osu.Framework.Extensions;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
{
|
||||
public abstract class Ruleset
|
||||
{
|
||||
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
|
||||
|
||||
public abstract ScoreOverlay CreateScoreOverlay();
|
||||
|
||||
public abstract HitRenderer CreateHitRendererWith(List<HitObject> objects);
|
||||
|
||||
public abstract HitObjectParser CreateHitObjectParser();
|
||||
|
||||
public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType());
|
||||
|
||||
protected abstract PlayMode PlayMode { get; }
|
||||
|
||||
public static Ruleset GetRuleset(PlayMode mode)
|
||||
{
|
||||
Type type;
|
||||
|
||||
if (!availableRulesets.TryGetValue(mode, out type))
|
||||
return null;
|
||||
|
||||
return Activator.CreateInstance(type) as Ruleset;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +1,13 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Timing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
public abstract class ComboCounter : Container
|
||||
{
|
@ -1,18 +1,13 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to display combo with a roll-up animation in results screen.
|
@ -1,16 +1,16 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
public abstract class HitRenderer : Container
|
||||
{
|
@ -1,10 +1,9 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
public class Playfield : Container
|
||||
{
|
@ -2,16 +2,12 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Modes.Objects;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
public abstract class ScoreOverlay : Container
|
||||
{
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Online.Chat.Display.osu.Online.Social;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
|
@ -1,74 +1,67 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.Online.Chat.Display
|
||||
{
|
||||
namespace osu.Online.Social
|
||||
public class ChatLine : Container
|
||||
{
|
||||
public class ChatLine : Container
|
||||
public readonly Message Message;
|
||||
|
||||
const float padding = 200;
|
||||
const float text_size = 20;
|
||||
|
||||
public ChatLine(Message message)
|
||||
{
|
||||
public readonly Message Message;
|
||||
this.Message = message;
|
||||
|
||||
const float padding = 200;
|
||||
const float text_size = 20;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
public ChatLine(Message message)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
this.Message = message;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
Children = new Drawable[]
|
||||
new Container
|
||||
{
|
||||
new Container
|
||||
Size = new Vector2(padding, text_size),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Size = new Vector2(padding, text_size),
|
||||
Children = new Drawable[]
|
||||
new SpriteText
|
||||
{
|
||||
new SpriteText
|
||||
{
|
||||
Text = Message.Timestamp.LocalDateTime.ToLongTimeString(),
|
||||
TextSize = text_size,
|
||||
Colour = new Color4(128, 128, 128, 255)
|
||||
},
|
||||
new SpriteText
|
||||
{
|
||||
Text = Message.User.Name,
|
||||
TextSize = text_size,
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
}
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Left = padding + 10 },
|
||||
Children = new Drawable[]
|
||||
Text = Message.Timestamp.LocalDateTime.ToLongTimeString(),
|
||||
TextSize = text_size,
|
||||
Colour = new Color4(128, 128, 128, 255)
|
||||
},
|
||||
new SpriteText
|
||||
{
|
||||
new SpriteText
|
||||
{
|
||||
Text = Message.Content,
|
||||
TextSize = text_size,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
Text = Message.User.Name,
|
||||
TextSize = text_size,
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Padding = new MarginPadding { Left = padding + 10 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText
|
||||
{
|
||||
Text = Message.Content,
|
||||
TextSize = text_size,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,22 +6,23 @@ using System.Threading;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.GameModes.Menu;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Input;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.GameModes;
|
||||
using osu.Game.Graphics.UserInterface.Volume;
|
||||
using osu.Game.Database;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
|
@ -9,10 +9,11 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
|
@ -2,11 +2,12 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
|
@ -6,13 +6,14 @@ using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Play;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Caching;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
|
@ -2,20 +2,16 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework;
|
||||
using System.Threading;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
namespace osu.Game.Screens
|
||||
{
|
||||
public abstract class BackgroundMode : GameMode, IEquatable<BackgroundMode>
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
|
||||
using osu.Game.Graphics.Background;
|
||||
|
||||
namespace osu.Game.GameModes.Backgrounds
|
||||
namespace osu.Game.Screens.Backgrounds
|
||||
{
|
||||
public class BackgroundModeCustom : BackgroundMode
|
||||
{
|
@ -5,7 +5,7 @@ using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics.Background;
|
||||
|
||||
namespace osu.Game.GameModes.Backgrounds
|
||||
namespace osu.Game.Screens.Backgrounds
|
||||
{
|
||||
public class BackgroundModeDefault : BackgroundMode
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.GameModes.Backgrounds
|
||||
namespace osu.Game.Screens.Backgrounds
|
||||
{
|
||||
public class BackgroundModeEmpty : BackgroundMode
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania
|
||||
namespace osu.Game.Screens.Charts
|
||||
{
|
||||
public class HoldNote : Note
|
||||
class ChartInfo : GameModeWhiteBox
|
||||
{
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.GameModes.Charts
|
||||
namespace osu.Game.Screens.Charts
|
||||
{
|
||||
class ChartListing : GameModeWhiteBox
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.GameModes.Direct
|
||||
namespace osu.Game.Screens.Direct
|
||||
{
|
||||
class OnlineListing : GameModeWhiteBox
|
||||
{
|
@ -3,9 +3,9 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
|
||||
namespace osu.Game.GameModes.Edit
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
class EditSongSelect : GameModeWhiteBox
|
||||
{
|
@ -1,16 +1,11 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Edit
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
class Editor : GameModeWhiteBox
|
||||
{
|
@ -9,13 +9,11 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
namespace osu.Game.Screens
|
||||
{
|
||||
public class GameModeWhiteBox : OsuGameMode
|
||||
{
|
@ -1,18 +1,16 @@
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using System;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Graphics;
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Button designed specifically for the osu!next main menu.
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -13,10 +14,8 @@ using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public partial class ButtonSystem : Container, IStateful<MenuState>
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// A flow container with an origin based on one of its contained drawables.
|
@ -1,19 +1,17 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Threading;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
class Intro : OsuGameMode
|
||||
{
|
@ -1,26 +1,22 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.GameModes.Testing;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.GameModes.Charts;
|
||||
using osu.Game.GameModes.Direct;
|
||||
using osu.Game.GameModes.Edit;
|
||||
using osu.Game.GameModes.Multiplayer;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Charts;
|
||||
using osu.Game.Screens.Direct;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Multiplayer;
|
||||
using osu.Game.Screens.Play;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Game.Overlays;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public class MainMenu : OsuGameMode
|
||||
{
|
8
osu.Game/Screens/Menu/MenuVisualisation.cs
Normal file
8
osu.Game/Screens/Menu/MenuVisualisation.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
internal class MenuVisualisation : Drawable
|
||||
{
|
||||
}
|
||||
}
|
@ -2,17 +2,16 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
@ -3,11 +3,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Multiplayer
|
||||
namespace osu.Game.Screens.Multiplayer
|
||||
{
|
||||
class Lobby : GameModeWhiteBox
|
||||
{
|
@ -3,15 +3,12 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Play;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Multiplayer
|
||||
namespace osu.Game.Screens.Multiplayer
|
||||
{
|
||||
class Match : GameModeWhiteBox
|
||||
{
|
@ -3,11 +3,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.GameModes.Multiplayer
|
||||
namespace osu.Game.Screens.Multiplayer
|
||||
{
|
||||
class MatchCreate : GameModeWhiteBox
|
||||
{
|
@ -1,16 +1,9 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
|
||||
namespace osu.Game.GameModes.Multiplayer
|
||||
namespace osu.Game.Screens.Multiplayer
|
||||
{
|
||||
class MatchSongSelect : GameModeWhiteBox
|
||||
{
|
@ -2,21 +2,13 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Background;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
namespace osu.Game.Screens
|
||||
{
|
||||
public abstract class OsuGameMode : GameMode
|
||||
{
|
@ -1,16 +1,11 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
class ModSelect : GameModeWhiteBox
|
||||
{
|
@ -2,29 +2,27 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Framework;
|
||||
using osu.Game.Database;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using System.Linq;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Game.Beatmaps.Drawable;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawable;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class PlaySongSelect : OsuGameMode
|
||||
{
|
@ -1,28 +1,24 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.GameModes.Play.Catch;
|
||||
using osu.Game.GameModes.Play.Mania;
|
||||
using osu.Game.GameModes.Play.Osu;
|
||||
using osu.Game.GameModes.Play.Taiko;
|
||||
using osu.Framework;
|
||||
using osu.Game.Database;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Input;
|
||||
using MouseState = osu.Framework.Input.MouseState;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class Player : OsuGameMode
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes.Ranking
|
||||
namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
class Results : GameModeWhiteBox
|
||||
{
|
@ -63,6 +63,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Modes\Objects\HitObjectParser.cs" />
|
||||
<Compile Include="Overlays\DragBar.cs" />
|
||||
<Compile Include="Overlays\MusicController.cs" />
|
||||
<Compile Include="Beatmaps\Beatmap.cs" />
|
||||
@ -71,28 +72,9 @@
|
||||
<Compile Include="Beatmaps\Drawable\BeatmapSetHeader.cs" />
|
||||
<Compile Include="Beatmaps\Drawable\DifficultyIcon.cs" />
|
||||
<Compile Include="Beatmaps\Drawable\Panel.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\CatchConverter.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\Drawable\DrawableFruit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\DrawableHitObject.cs" />
|
||||
<Compile Include="Beatmaps\Objects\HitObject.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\CatchBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\Droplet.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\Fruit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\HitObjectConverter.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\Drawable\DrawableNote.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\HoldNote.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\ManiaBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\ManiaConverter.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\Note.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\Circle.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\Drawable\DrawableCircle.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\OsuBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\OsuConverter.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\Slider.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\Spinner.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Taiko\Drawable\DrawableTaikoHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Taiko\TaikoBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Taiko\TaikoConverter.cs" />
|
||||
<Compile Include="Modes\Objects\Drawables\DrawableHitObject.cs" />
|
||||
<Compile Include="Modes\Objects\HitObject.cs" />
|
||||
<Compile Include="Modes\Objects\HitObjectConverter.cs" />
|
||||
<Compile Include="Beatmaps\Samples\HitSampleInfo.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleBank.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleInfo.cs" />
|
||||
@ -102,56 +84,42 @@
|
||||
<Compile Include="Beatmaps\Timing\SampleChange.cs" />
|
||||
<Compile Include="Beatmaps\Timing\TimingChange.cs" />
|
||||
<Compile Include="Configuration\OsuConfigManager.cs" />
|
||||
<Compile Include="GameModes\BackgroundMode.cs" />
|
||||
<Compile Include="GameModes\Backgrounds\BackgroundModeCustom.cs" />
|
||||
<Compile Include="GameModes\Backgrounds\BackgroundModeDefault.cs" />
|
||||
<Compile Include="GameModes\Backgrounds\BackgroundModeEmpty.cs" />
|
||||
<Compile Include="GameModes\Charts\ChartInfo.cs" />
|
||||
<Compile Include="GameModes\Edit\Editor.cs" />
|
||||
<Compile Include="GameModes\GameModeWhiteBox.cs" />
|
||||
<Compile Include="GameModes\Menu\Button.cs" />
|
||||
<Compile Include="GameModes\Menu\FlowContainerWithOrigin.cs" />
|
||||
<Compile Include="GameModes\Menu\Intro.cs" />
|
||||
<Compile Include="GameModes\Menu\ButtonSystem.cs" />
|
||||
<Compile Include="GameModes\Menu\MainMenu.cs" />
|
||||
<Compile Include="GameModes\Menu\MenuVisualisation.cs" />
|
||||
<Compile Include="GameModes\Menu\OsuLogo.cs" />
|
||||
<Compile Include="GameModes\Multiplayer\Lobby.cs" />
|
||||
<Compile Include="GameModes\Multiplayer\Match.cs" />
|
||||
<Compile Include="GameModes\Multiplayer\MatchCreate.cs" />
|
||||
<Compile Include="GameModes\Multiplayer\MatchSongSelect.cs" />
|
||||
<Compile Include="GameModes\OsuGameMode.cs" />
|
||||
<Compile Include="GameModes\Play\Catch\CatchRuleset.cs" />
|
||||
<Compile Include="GameModes\Play\Mania\ManiaRuleset.cs" />
|
||||
<Compile Include="GameModes\Play\ModSelect.cs" />
|
||||
<Compile Include="GameModes\Play\Osu\OsuRuleset.cs" />
|
||||
<Compile Include="GameModes\Play\Osu\ScoreOverlayOsu.cs" />
|
||||
<Compile Include="Screens\BackgroundMode.cs" />
|
||||
<Compile Include="Screens\Backgrounds\BackgroundModeCustom.cs" />
|
||||
<Compile Include="Screens\Backgrounds\BackgroundModeDefault.cs" />
|
||||
<Compile Include="Screens\Backgrounds\BackgroundModeEmpty.cs" />
|
||||
<Compile Include="Screens\Charts\ChartInfo.cs" />
|
||||
<Compile Include="Screens\Edit\Editor.cs" />
|
||||
<Compile Include="Screens\GameModeWhiteBox.cs" />
|
||||
<Compile Include="Screens\Menu\Button.cs" />
|
||||
<Compile Include="Screens\Menu\FlowContainerWithOrigin.cs" />
|
||||
<Compile Include="Screens\Menu\Intro.cs" />
|
||||
<Compile Include="Screens\Menu\ButtonSystem.cs" />
|
||||
<Compile Include="Screens\Menu\MainMenu.cs" />
|
||||
<Compile Include="Screens\Menu\MenuVisualisation.cs" />
|
||||
<Compile Include="Screens\Menu\OsuLogo.cs" />
|
||||
<Compile Include="Screens\Multiplayer\Lobby.cs" />
|
||||
<Compile Include="Screens\Multiplayer\Match.cs" />
|
||||
<Compile Include="Screens\Multiplayer\MatchCreate.cs" />
|
||||
<Compile Include="Screens\Multiplayer\MatchSongSelect.cs" />
|
||||
<Compile Include="Screens\OsuGameMode.cs" />
|
||||
<Compile Include="Screens\Play\ModSelect.cs" />
|
||||
<Compile Include="Beatmaps\Drawable\BeatmapGroup.cs" />
|
||||
<Compile Include="Beatmaps\Drawable\BeatmapPanel.cs" />
|
||||
<Compile Include="GameModes\Play\Player.cs" />
|
||||
<Compile Include="GameModes\Charts\ChartListing.cs" />
|
||||
<Compile Include="GameModes\Play\PlayMode.cs" />
|
||||
<Compile Include="GameModes\Play\Ruleset.cs" />
|
||||
<Compile Include="GameModes\Play\Taiko\TaikoRuleset.cs" />
|
||||
<Compile Include="GameModes\Ranking\Results.cs" />
|
||||
<Compile Include="GameModes\Direct\OnlineListing.cs" />
|
||||
<Compile Include="GameModes\Play\PlaySongSelect.cs" />
|
||||
<Compile Include="GameModes\Play\Catch\CatchHitRenderer.cs" />
|
||||
<Compile Include="GameModes\Play\Catch\CatchPlayfield.cs" />
|
||||
<Compile Include="GameModes\Play\HitRenderer.cs" />
|
||||
<Compile Include="GameModes\Play\Mania\ManiaHitRenderer.cs" />
|
||||
<Compile Include="GameModes\Play\Mania\ManiaPlayfield.cs" />
|
||||
<Compile Include="GameModes\Play\Osu\OsuHitRenderer.cs" />
|
||||
<Compile Include="GameModes\Play\Osu\OsuPlayfield.cs" />
|
||||
<Compile Include="GameModes\Play\Playfield.cs" />
|
||||
<Compile Include="GameModes\Play\ScoreOverlay.cs" />
|
||||
<Compile Include="GameModes\Play\Taiko\TaikoHitRenderer.cs" />
|
||||
<Compile Include="GameModes\Play\Taiko\TaikoPlayfield.cs" />
|
||||
<Compile Include="GameModes\Edit\EditSongSelect.cs" />
|
||||
<Compile Include="GameModes\Play\ComboCounter.cs" />
|
||||
<Compile Include="GameModes\Play\ComboResultCounter.cs" />
|
||||
<Compile Include="Screens\Play\Player.cs" />
|
||||
<Compile Include="Screens\Charts\ChartListing.cs" />
|
||||
<Compile Include="Modes\PlayMode.cs" />
|
||||
<Compile Include="Modes\Ruleset.cs" />
|
||||
<Compile Include="Screens\Ranking\Results.cs" />
|
||||
<Compile Include="Screens\Direct\OnlineListing.cs" />
|
||||
<Compile Include="Screens\Play\PlaySongSelect.cs" />
|
||||
<Compile Include="Modes\UI\HitRenderer.cs" />
|
||||
<Compile Include="Modes\UI\Playfield.cs" />
|
||||
<Compile Include="Modes\UI\ScoreOverlay.cs" />
|
||||
<Compile Include="Screens\Edit\EditSongSelect.cs" />
|
||||
<Compile Include="Modes\UI\ComboCounter.cs" />
|
||||
<Compile Include="Modes\UI\ComboResultCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\RollingCounter.cs" />
|
||||
<Compile Include="GameModes\Play\Taiko\TaikoComboCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\Volume\VolumeControlReceptor.cs" />
|
||||
<Compile Include="Input\GlobalHotkeys.cs" />
|
||||
<Compile Include="Graphics\Background\Background.cs" />
|
||||
@ -159,15 +127,12 @@
|
||||
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />
|
||||
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
||||
<Compile Include="Graphics\TextAwesome.cs" />
|
||||
<Compile Include="GameModes\Play\Mania\ManiaComboCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\KeyCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\KeyCounterKeyboard.cs" />
|
||||
<Compile Include="Graphics\UserInterface\KeyCounterCollection.cs" />
|
||||
<Compile Include="Graphics\UserInterface\KeyCounterMouse.cs" />
|
||||
<Compile Include="Graphics\UserInterface\PercentageCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\ScoreCounter.cs" />
|
||||
<Compile Include="GameModes\Play\Catch\CatchComboCounter.cs" />
|
||||
<Compile Include="GameModes\Play\Osu\OsuComboCounter.cs" />
|
||||
<Compile Include="Graphics\UserInterface\StarCounter.cs" />
|
||||
<Compile Include="IPC\BeatmapImporter.cs" />
|
||||
<Compile Include="Online\API\APIAccess.cs" />
|
||||
|
Reference in New Issue
Block a user