mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
36 lines
880 B
C#
36 lines
880 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework;
|
|
using osu.Framework.Graphics;
|
|
using osuTK;
|
|
using osuTK.Graphics;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using osu.Framework.Allocation;
|
|
|
|
namespace SampleGame
|
|
{
|
|
public partial class SampleGameGame : Game
|
|
{
|
|
private Box box = null!;
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
Add(box = new Box
|
|
{
|
|
Anchor = Anchor.Centre,
|
|
Origin = Anchor.Centre,
|
|
Size = new Vector2(150, 150),
|
|
Colour = Color4.Tomato
|
|
});
|
|
}
|
|
|
|
protected override void Update()
|
|
{
|
|
base.Update();
|
|
box.Rotation += (float)Time.Elapsed / 10;
|
|
}
|
|
}
|
|
}
|