mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Refactor + Stars Counter (initial)
Moved a few things to allow using common transforms for a star counter. This implementation is basic and hacky, but good enough as proof of concept.
This commit is contained in:
@ -87,6 +87,14 @@ namespace osu.Desktop.Tests
|
||||
};
|
||||
Add(pc);
|
||||
|
||||
StarCounter tc = new StarCounter
|
||||
{
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Position = new Vector2(20, 160),
|
||||
};
|
||||
Add(tc);
|
||||
|
||||
AddButton(@"Reset all", delegate
|
||||
{
|
||||
uc.Count = 0;
|
||||
@ -119,6 +127,11 @@ namespace osu.Desktop.Tests
|
||||
pc.Denominator++;
|
||||
});
|
||||
|
||||
AddButton(@"Alter stars", delegate
|
||||
{
|
||||
tc.Count = RNG.NextSingle() * tc.MaxStars;
|
||||
});
|
||||
|
||||
AddButton(@"Stop counters", delegate
|
||||
{
|
||||
uc.StopRolling();
|
||||
@ -126,6 +139,7 @@ namespace osu.Desktop.Tests
|
||||
cc.StopRolling();
|
||||
ac.StopRolling();
|
||||
pc.StopRolling();
|
||||
tc.StopRolling();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user