This is a fork of the official FlashPunk repo.
You can learn more about FlashPunk at http://flashpunk.net.
- Components, for reusable entity functionality.
- Signals, for lightweight events attached to objects.
- Entity class:
- Added
created()
, like added, but called byworld.create()
. - Made
moveBy()
returntrue
when it actually moves the entity.
- Added
- FP class:
- Added
FP.worldTime
(seconds since world started). - Added
FP.time
(absolute time in seconds, from Flash's getTimer).
- Added
- Grid class:
- Added grid vs grid collision test.
- Image class:
- Added
lock()
/unlock()
to defer buffer updates, for a performance boost when updating many image properties.
- Added
- Screen class:
- Optional alpha, so you can layer other DisplayObjects under FP.
- Sfx class:
- Added a
minElapsed
argument toplay()
to rate limit a sound. - Added a
type
property, so you can categorize sounds. You can modify the volume and panning for sounds en masse via theSfx.setVolume()
andSfx.setPan()
methods.
- Added a
- Spritemap class:
- Animations can be flipped.
- Added an
animCount
property.
- Tilemap class:
- Added
createGrid()
to create a mask from tile indexes.
- Added
- Tween class:
- Added public
updateTween()
, so you can tick tween objects manually fromGraphic
classes.
- Added public
I've also merged goodness from these fine fellows:
Bug fixes with open pull requests have feature branches. Check the branches list for this repo to see the modifications for that fix, or look at the pull requests on ChevyRay's repo.
- Fixed
Entity.render()
andupdate()
being called with null world - Clamped
FP.getColorHSV()
(pull request) - Fixed problems with null parent when using a
Masklist
(pull request) - Fixed
World.registerName()
incorrectly being called before name is set (pull request) - Fixed
Entity.addGraphic()
not actually adding the graphic for a newGraphiclist
(pull request) - Made image classes
_createBuffer()
dispose of existing buffer objects (pull request) - Fixed
Text
being getting cropped when changed (pull request) - Made
Grid.saveToString()
output 0 and 1, so it works withGrid.loadFromString()
(pull request)
This fork has a Rakefile for building on OS X (thought it would probably work with the Flex SDK on Windows, too). By default, it dumps a debug SWC file into the bin folder, and builds any projects in the examples folder.
You don't need to do any of that, though. You can just copy the net folder into your project, like normal.