SPUDevelopers / Naturalize

A Cocos2d-x turn based strategy game.
Other
11 stars 7 forks source link

Add tile class #19

Closed Isaac-W closed 9 years ago

Isaac-W commented 9 years ago

The Tile class basically holds a bunch of tile attributes and stats for a given type of tile. For example, a field tile may have high visibility stat, low movement penalty, but a low defense buff, stuff like that. Attributes and methods should follow the Naturalize documentation.

These tiles will eventually be handled by the Naturalize Tile Manager, which will be the main interface for the GameScene to get access to these tiles. The Tiled map levels need to have a way to identify the tile type of a specific coordinate on the map; this will be some sort of custom attribute associated with the tileset, giving it a uniquely identifyable (but reusable) ID tag of sorts. As for now, just assume that the ID value will be a string, so include an ID string attribute in the Tile class.

Tileset loading will be handled by the Tile Manager; Tile objects themselves will only serve as containers for the stats, with methods to access and calculate some properties.