Skip to content

Instantly share code, notes, and snippets.

@richtaur
Created August 19, 2012 02:20
Show Gist options
  • Save richtaur/3391052 to your computer and use it in GitHub Desktop.
Save richtaur/3391052 to your computer and use it in GitHub Desktop.
// Before
this._stageCollection.add(new LevelButton({
parent: this._container,
stage: stageId,
stageId: stages[levelNumber],
levelNumber: levelNumber,
x: (offsetX + levelNumber - 1) * buttonStyle.width,
y: offsetY * buttonStyle.height
}));
// After
var levelButton = new LevelButton({
parent: this._container,
stage: stageId,
stageId: stages[levelNumber],
levelNumber: levelNumber,
x: (offsetX + levelNumber - 1) * buttonStyle.width,
y: offsetY * buttonStyle.height
});
this._stageCollection.add(levelButton);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment