Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to add commands to the console (Citrus Engine recipe)
//In the Main class add this command. It will pause and unpause the game :
this.console.addCommand("pause", pauseGame);
private function pauseGame():void {
this.playing = !this.playing;
}
//Using parameters :
this.console.addCommand("goto", goto);
private function goto(level:uint):void {
trace("you should load level " + level);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.