Skip to content

Instantly share code, notes, and snippets.

@Draknek
Created August 9, 2012 11:43
Show Gist options
  • Save Draknek/3303498 to your computer and use it in GitHub Desktop.
Save Draknek/3303498 to your computer and use it in GitHub Desktop.
// Not enough context here to be useful, I will make a self-contained example soon.
// This code allocates memory:
_timer += (FP.timeInFrames ? _anim._frameRate : _anim._frameRate * FP.elapsed) * rate;
// This code does not:
var timeAdd:Number = _anim._frameRate * rate;
if (! FP.timeInFrames) timeAdd *= FP.elapsed;
_timer += timeAdd;
// Types:
_timer: Number
FP.timeInFrames: Boolean
_anim: Anim (contains _frameRate: Number)
FP.elapsed: Number
rate: Number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment