2016-09-02 17:06:36 +08:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2016-09-02 17:27:38 +08:00
|
|
|
|
using System.Collections.Generic;
|
2016-09-02 17:06:36 +08:00
|
|
|
|
using osu.Framework.GameModes;
|
2016-09-02 19:30:27 +08:00
|
|
|
|
using osu.Framework.MathUtils;
|
2016-09-02 17:27:38 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Beatmaps.Objects;
|
2016-09-02 18:25:13 +08:00
|
|
|
|
using osu.Game.Beatmaps.Objects.Osu;
|
2016-09-02 19:30:27 +08:00
|
|
|
|
using osu.Game.GameModes.Play.Catch;
|
2016-09-02 18:25:13 +08:00
|
|
|
|
using osu.Game.GameModes.Play.Osu;
|
2016-09-02 18:50:22 +08:00
|
|
|
|
using osu.Game.GameModes.Play.Taiko;
|
2016-09-02 19:30:27 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.GameModes.Play.Mania;
|
2016-09-02 18:25:13 +08:00
|
|
|
|
using OpenTK;
|
2016-09-02 17:06:36 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.GameModes.Play
|
|
|
|
|
{
|
2016-09-02 18:25:13 +08:00
|
|
|
|
public class PlayTest : GameMode
|
2016-09-02 17:06:36 +08:00
|
|
|
|
{
|
|
|
|
|
public override void Load()
|
|
|
|
|
{
|
|
|
|
|
base.Load();
|
2016-09-02 17:27:38 +08:00
|
|
|
|
|
2016-09-02 19:30:27 +08:00
|
|
|
|
List<BaseHit> objects = new List<BaseHit>();
|
|
|
|
|
|
|
|
|
|
int time = 0;
|
|
|
|
|
for (int i = 0; i < 100; i++)
|
2016-09-02 17:27:38 +08:00
|
|
|
|
{
|
2016-09-02 19:30:27 +08:00
|
|
|
|
objects.Add(new Circle()
|
2016-09-02 18:25:13 +08:00
|
|
|
|
{
|
2016-09-02 19:30:27 +08:00
|
|
|
|
StartTime = time,
|
|
|
|
|
Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384))
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
time += RNG.Next(50, 500);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Beatmap beatmap = new Beatmap
|
|
|
|
|
{
|
|
|
|
|
HitObjects = objects
|
2016-09-02 17:27:38 +08:00
|
|
|
|
};
|
|
|
|
|
|
2016-09-02 19:30:27 +08:00
|
|
|
|
Add(new OsuHitRenderer()
|
|
|
|
|
{
|
|
|
|
|
Objects = beatmap.HitObjects,
|
2016-09-11 01:27:42 +08:00
|
|
|
|
Scale = new Vector2(0.5f),
|
2016-09-02 19:30:27 +08:00
|
|
|
|
Anchor = Anchor.TopLeft,
|
|
|
|
|
Origin = Anchor.TopLeft
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Add(new TaikoHitRenderer()
|
|
|
|
|
{
|
|
|
|
|
Objects = beatmap.HitObjects,
|
2016-09-11 01:27:42 +08:00
|
|
|
|
Scale = new Vector2(0.5f),
|
2016-09-02 19:30:27 +08:00
|
|
|
|
Anchor = Anchor.TopRight,
|
|
|
|
|
Origin = Anchor.TopRight
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Add(new CatchHitRenderer()
|
|
|
|
|
{
|
|
|
|
|
Objects = beatmap.HitObjects,
|
2016-09-11 01:27:42 +08:00
|
|
|
|
Scale = new Vector2(0.5f),
|
2016-09-02 19:30:27 +08:00
|
|
|
|
Anchor = Anchor.BottomLeft,
|
|
|
|
|
Origin = Anchor.BottomLeft
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Add(new ManiaHitRenderer()
|
|
|
|
|
{
|
|
|
|
|
Objects = beatmap.HitObjects,
|
2016-09-11 01:27:42 +08:00
|
|
|
|
Scale = new Vector2(0.5f),
|
2016-09-02 19:30:27 +08:00
|
|
|
|
Anchor = Anchor.BottomRight,
|
|
|
|
|
Origin = Anchor.BottomRight
|
|
|
|
|
});
|
2016-09-02 17:06:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|