Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addPanel = ->
- ix = Utils.round((Math.random() * ((numColumns * numRows) - 1)), 0)
- if panels[ix]?
- panels[ix].destroy()
- panels[ix] = new Layer
- width:panelWidth
- height:panelHeight
- x: (ix % numColumns) * panelWidth
- y: (0 | ix / numRows) * panelHeight
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement