Skip to content

Instantly share code, notes, and snippets.

@BruceJillis
Created October 16, 2012 07:26
Show Gist options
  • Save BruceJillis/3897768 to your computer and use it in GitHub Desktop.
Save BruceJillis/3897768 to your computer and use it in GitHub Desktop.
Guess the semantics
static public function ....(Number1:Number,Number2:Number):Number {
return (Number1 >= Number2) ? Number1 : Number2;
}
public function ....():void {
_timeCounter += FlxG.elapsed;
while((_timeCounter >= time) && !paused && !finished) {
_timeCounter -= time;
_loopsCounter++;
if((loops > 0) && (_loopsCounter >= loops))
stop();
if(_callback != null)
_callback(this);
}
}
static public function ....(Objects:Array, HowManyTimes:uint):Array {
var i:uint = 0;
var index1:uint;
var index2:uint;
var object:Object;
while(i < HowManyTimes) {
index1 = FlxG.random()*Objects.length;
index2 = FlxG.random()*Objects.length;
object = Objects[index2];
Objects[index2] = Objects[index1];
Objects[index1] = object;
i++;
}
return Objects;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment