public override void Update() { if (videoSpeed.isNextTick(Time.time)) { videoSprite.DrawNextFrame(); } }
public void Update(float time) { if (metronome.isNextTick(time)) { hidePiecesForTick(metronome.nextTick); scrollingLetters.Update(time); } }
public void Update(float time) { if (scrollingFrequency.isNextTick(time)) { scrollLetters(time); if (scrollingFrequency.nextTick > 5) { scrollSides(time); } } }
void animateFallingPieces(float time) { if (pouringAnimationFrequency.isNextTick(time)) { for (int i = 0; i < confetti.Length; i++) { var sprite = confetti[i].GetComponent <Sprite>(); if (sprite.getScreenPosition().y > verticalFloor) { sprite.move(Vector3.down * dropSpeeds[i]); } } } }
public void Update() { if (swinging && swingInterval.isNextTick(Time.time)) { if (swingInterval.nextTick < swingLength) { swingPivot.transform.Rotate(0f, 0f, swingIncrement); } else if (swingInterval.nextTick >= swingLength && swingInterval.nextTick < swingLength * 2) { swingPivot.transform.Rotate(0f, 0f, -swingIncrement); } else if (swingInterval.nextTick == swingLength * 2) { swinging = false; swingInterval = new Metronome(Time.time, 0.1f); } } }