1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 04:53:29 +01:00

made the wobble animation loop

This commit is contained in:
Ellpeck 2019-08-24 19:52:28 +02:00
parent 287885b96d
commit 90352c49f4

View file

@ -195,7 +195,7 @@ namespace Demos {
// Note that this particular example makes use of the Coroutine package
private IEnumerator<Wait> WobbleButton(Element button) {
var counter = 0F;
while (counter < 10) {
while (counter < 4 * Math.PI) {
// The imporant bit is that it changes its added display scale and offset, allowing the button to still maintain the
// correct position and scaling for both anchoring and interacting purposes, but to show any kind of animation visually
// This could be useful, for example, to create a little feedback effect to clicking it where it changes size for a second