Skip to content

Instantly share code, notes, and snippets.

@Neurogami
Created February 27, 2013 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neurogami/5053009 to your computer and use it in GitHub Desktop.
Save Neurogami/5053009 to your computer and use it in GitHub Desktop.
Leap game code
grow: function (scaleFactorArray) {
var timeNow = new Date().getTime() / 1000;
var tDelta = timeNow - this.lastGrowMessage;
this.walkingTo = false;
this.growing = true;
this.bitmapAnim.scaleX = scaleFactorArray[0];
this.bitmapAnim.scaleY = scaleFactorArray[0];
if (tDelta < this.minGrowCallsTime ) { return }
this.lastGrowMessage = timeNow;
this.bitmapAnim.gotoAndPlay("grow");
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment