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:
Adonais Romero González
2016-10-08 19:11:01 -05:00
parent a3b4a34a1a
commit 5ebb2fc289
8 changed files with 210 additions and 45 deletions

View File

@ -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();
});
}
}