-
Notifications
You must be signed in to change notification settings - Fork 83
Changelog
Allows detection of mouse click events. Tested on OSX, should work on Linux - not a clue about Windows. [Edit: tested on Windows.]
Example added at _examples/click.go.
This allows a user to supply a JSON array of object attributes, which will be parsed into the level. It also allows users to define their own parsers for custom object types.
Additional changes:
- The Level interface now also requires that the
AddEntity(Drawable)
andRemoveEntity(Drawable)
methods be implemented. - Image processing has been altered - any pixels with transparency will be treated as fully transparent rather than fully opaque.
To add a new Drawable, one must explicitly add it to either a Screen or a Level - one can no longer add it to a Game directly. For example:
game.AddEntity(entity)
will now be:
game.Screen().AddEntity(entity)
To add an Entity to the current Level of the Game's current Screen:
game.Screen().Level().AddEntity(entity)
A string can be provided to create a Canvas, and an Entity can be created using a Canvas. Newlines in the string are interpreted as a new row in the Canvas. This is useful if you want to store complex 'sprites' as text files.
The Termloop extras package contains code which is dependant on some external dependencies. In the case of audio, PortAudio and libsndfile are required.