-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from pflat/animated_tiles
Add support for animeted tiles in tmx files
- Loading branch information
Showing
11 changed files
with
246 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
$#include "Urho2D/TmxFile2D.h" | ||
|
||
// FIXME: complete the bindings for the rest of the class methods | ||
class TmxLayer2D | ||
{ | ||
TmxFile2D* GetTmxFile() const; | ||
TileMapLayerType2D GetType() const; | ||
const String GetName() const; | ||
int GetWidth() const; | ||
int GetHeight() const; | ||
bool IsVisible() const; | ||
bool HasProperty(const String name) const; | ||
const String GetProperty(const String name) const; | ||
} | ||
|
||
class TmxTileLayer2D : TmxLayer2D | ||
{ | ||
Tile2D* GetTile(int x, int y) const; | ||
} | ||
|
||
class TmxObjectGroup2D : TmxLayer2D | ||
{ | ||
unsigned GetNumObjects() const; | ||
TileMapObject2D* GetObject(unsigned index) const; | ||
} | ||
|
||
class TmxImageLayer2D : TmxLayer2D | ||
{ | ||
const Vector2 GetPosition() const; | ||
const String GetSource() const; | ||
Sprite2D* GetSprite() const; | ||
} | ||
|
||
class TmxFile2D : Resource | ||
{ | ||
void SetSpriteTextureEdgeOffset(float offset); | ||
bool SetInfo(Orientation2D orientation, int width, int height, float tileWidth, float tileHeight); | ||
void AddLayer(unsigned index, TmxLayer2D *layer); | ||
void AddLayer(TmxLayer2D* layer); | ||
const TileMapInfo2D GetInfo() const; | ||
Sprite2D* GetTileSprite(unsigned gid) const; | ||
|
||
PropertySet2D* GetTilePropertySet(unsigned gid) const; | ||
FrameSet2D* GetTileFrameSet(unsigned gid) const; | ||
|
||
void UpdateAnimationTimers(float timeStep); | ||
unsigned GetNumLayers() const; | ||
const TmxLayer2D* GetLayer(unsigned index) const; | ||
void SetSpriteTextureEdgeOffset(float offset); | ||
float GetSpriteTextureEdgeOffset() const; | ||
|
||
tolua_readonly tolua_property__get_set TileMapInfo2D info; | ||
tolua_property__get_set float spriteTextureEdgeOffset @ edgeOffset; | ||
}; |
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
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
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
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
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
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
Oops, something went wrong.