private void AdvanceAnimation() { if (Time.time > ANIMATION_DELAY + _lastUpdatedAnimationTime) { currentFrame = OurUtils.ValueLooper(currentFrame, 0, 3); _lastUpdatedAnimationTime = Time.time; } }
private void AdvanceBirdAnimation() { if (currentFrame == 0 && _birdFlap % 3 == 0) { _actualAnimationDelay = GLIDE_TIME; } if (Time.time > _actualAnimationDelay + _lastUpdatedAnimationTime) { //currentFrame = OurUtils.ValueBouncer(currentFrame, 0, 2); currentFrame = OurUtils.ValueLooper(currentFrame, 0, 3); _lastUpdatedAnimationTime = Time.time; _actualAnimationDelay = ANIMATION_DELAY; _birdFlap++; } }