mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09:00
Move playfields to own class.
This commit is contained in:
parent
93744f7372
commit
024ae1d1c2
@ -4,12 +4,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Drawables;
|
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Game.Beatmaps.Objects;
|
using osu.Game.Beatmaps.Objects;
|
||||||
using osu.Game.Beatmaps.Objects.Osu;
|
using osu.Game.Beatmaps.Objects.Osu;
|
||||||
using OpenTK;
|
|
||||||
|
|
||||||
namespace osu.Game.GameModes.Play.Osu
|
namespace osu.Game.GameModes.Play.Osu
|
||||||
{
|
{
|
||||||
@ -64,21 +61,4 @@ namespace osu.Game.GameModes.Play.Osu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OsuPlayfield : Container
|
|
||||||
{
|
|
||||||
public OsuPlayfield()
|
|
||||||
{
|
|
||||||
Size = new Vector2(512, 384);
|
|
||||||
Anchor = Anchor.Centre;
|
|
||||||
Origin = Anchor.Centre;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Load()
|
|
||||||
{
|
|
||||||
base.Load();
|
|
||||||
|
|
||||||
Add(new Box() { SizeMode = InheritMode.XY, Alpha = 0.5f });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
27
osu.Game/GameModes/Play/Osu/OsuPlayfield.cs
Normal file
27
osu.Game/GameModes/Play/Osu/OsuPlayfield.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//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.Drawables;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
|
namespace osu.Game.GameModes.Play.Osu
|
||||||
|
{
|
||||||
|
public class OsuPlayfield : Container
|
||||||
|
{
|
||||||
|
public OsuPlayfield()
|
||||||
|
{
|
||||||
|
Size = new Vector2(512, 384);
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
base.Load();
|
||||||
|
|
||||||
|
Add(new Box() { SizeMode = InheritMode.XY, Alpha = 0.5f });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,14 +5,11 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Drawables;
|
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Game.Beatmaps.Objects;
|
using osu.Game.Beatmaps.Objects;
|
||||||
using osu.Game.Beatmaps.Objects.Osu;
|
using osu.Game.Beatmaps.Objects.Osu;
|
||||||
using osu.Game.Beatmaps.Objects.Taiko;
|
using osu.Game.Beatmaps.Objects.Taiko;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.GameModes.Play.Taiko
|
namespace osu.Game.GameModes.Play.Taiko
|
||||||
{
|
{
|
||||||
@ -86,31 +83,4 @@ namespace osu.Game.GameModes.Play.Taiko
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TaikoPlayfield : Container
|
|
||||||
{
|
|
||||||
public TaikoPlayfield()
|
|
||||||
{
|
|
||||||
SizeMode = InheritMode.X;
|
|
||||||
Size = new Vector2(1, 100);
|
|
||||||
Anchor = Anchor.Centre;
|
|
||||||
Origin = Anchor.Centre;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Load()
|
|
||||||
{
|
|
||||||
base.Load();
|
|
||||||
|
|
||||||
Add(new Box() { SizeMode = InheritMode.XY, Alpha = 0.5f });
|
|
||||||
|
|
||||||
Add(new Sprite(Game.Textures.Get(@"menu-osu"))
|
|
||||||
{
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Scale = 0.2f,
|
|
||||||
PositionMode = InheritMode.XY,
|
|
||||||
Position = new Vector2(0.1f, 0.5f),
|
|
||||||
Colour = Color4.Gray
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
39
osu.Game/GameModes/Play/Taiko/TaikoPlayfield.cs
Normal file
39
osu.Game/GameModes/Play/Taiko/TaikoPlayfield.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 osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Drawables;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.GameModes.Play.Taiko
|
||||||
|
{
|
||||||
|
public class TaikoPlayfield : Container
|
||||||
|
{
|
||||||
|
public TaikoPlayfield()
|
||||||
|
{
|
||||||
|
SizeMode = InheritMode.X;
|
||||||
|
Size = new Vector2(1, 100);
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
base.Load();
|
||||||
|
|
||||||
|
Add(new Box() { SizeMode = InheritMode.XY, Alpha = 0.5f });
|
||||||
|
|
||||||
|
Add(new Sprite(Game.Textures.Get(@"menu-osu"))
|
||||||
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Scale = 0.2f,
|
||||||
|
PositionMode = InheritMode.XY,
|
||||||
|
Position = new Vector2(0.1f, 0.5f),
|
||||||
|
Colour = Color4.Gray
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -75,8 +75,10 @@
|
|||||||
<Compile Include="GameModes\FieldTest.cs" />
|
<Compile Include="GameModes\FieldTest.cs" />
|
||||||
<Compile Include="GameModes\Play\HitRenderer.cs" />
|
<Compile Include="GameModes\Play\HitRenderer.cs" />
|
||||||
<Compile Include="GameModes\Play\Osu\OsuHitRenderer.cs" />
|
<Compile Include="GameModes\Play\Osu\OsuHitRenderer.cs" />
|
||||||
|
<Compile Include="GameModes\Play\Osu\OsuPlayfield.cs" />
|
||||||
<Compile Include="GameModes\Play\PlayTest.cs" />
|
<Compile Include="GameModes\Play\PlayTest.cs" />
|
||||||
<Compile Include="GameModes\Play\Taiko\TaikoHitRenderer.cs" />
|
<Compile Include="GameModes\Play\Taiko\TaikoHitRenderer.cs" />
|
||||||
|
<Compile Include="GameModes\Play\Taiko\TaikoPlayfield.cs" />
|
||||||
<Compile Include="Graphics\Containers\OsuComponent.cs" />
|
<Compile Include="Graphics\Containers\OsuComponent.cs" />
|
||||||
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
|
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
|
||||||
<Compile Include="Graphics\Containers\OsuLargeComponent.cs" />
|
<Compile Include="Graphics\Containers\OsuLargeComponent.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user