uint for ids

This commit is contained in:
Adonais Romero González 2016-10-12 21:03:41 -05:00
parent cd7884f00e
commit bf832ebe71
1 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ public class StandardComboCounter : ULongCounter
{
protected SpriteText popOutSpriteText;
protected volatile int scheduledPopOutCurrentId = 0;
protected uint scheduledPopOutCurrentId = 0;
public ulong PopOutDuration = 0;
public float PopOutBigScale = 2.0f;
@ -84,6 +84,7 @@ protected override void transformCount(ulong currentValue, ulong newValue)
removeTransforms(typeof(TransformULongCounter));
VisibleCount = newValue;
}
// Also, ignore rollback if already rollbacking
else if (currentValue != 0)
transformCount(new TransformULongCounter(Clock), currentValue, newValue);
}
@ -113,7 +114,7 @@ protected virtual void transformPopOut(ulong currentValue, ulong newValue)
popOutSpriteText.MoveTo(countSpriteText.Position, PopOutDuration, PopOutEasing);
scheduledPopOutCurrentId++;
int newTaskId = scheduledPopOutCurrentId;
uint newTaskId = scheduledPopOutCurrentId;
Scheduler.AddDelayed(delegate
{
scheduledPopOutSmall(newTaskId, newValue);
@ -134,7 +135,7 @@ protected virtual void transformPopOutSmall(ulong newValue)
countSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing);
}
protected virtual void scheduledPopOutSmall(int id, ulong newValue)
protected virtual void scheduledPopOutSmall(uint id, ulong newValue)
{
// Too late; scheduled task invalidated
if (id != scheduledPopOutCurrentId)