Created
August 11, 2013 06:13
-
-
Save lesliev/6203647 to your computer and use it in GitHub Desktop.
How do you refer to @tileSize and @tile in the constructor there? They are undefined.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MapGenerator | |
@tileSize: 20 # width and height of a tile | |
# should this be a power of 2 for WebGL TilingSprite? | |
@tile: | |
floor: 0 # clear floor that objects can move through | |
wall: 1 # wall, creating an obstacle | |
deadspace: -1 | |
constructor: (width, height) -> | |
console.log(@tileSize) | |
console.log(@tile.deadspace) | |
mg = new MapGenerator(10,10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment