Does PushButton Game Engine have the notion of a Camera?
I am playing around a bit with the PushButton Engine for game development in Flash and have come across a need for a Camera like the Camera that follows Mario in Mario Games. Flashpunk has a nice implementation of it.
Does PushButton have it out of the Box?(I searched for it and didn't find, hence the question here). If not then if any of you have written a component for the 开发者_Python百科same, or can guide in the direction, any help would be much appreciated. Thanks
There is a variable trackObject in the class DisplayObjectScene that tracks a DisplayObjectRenderer automatically.
The offical documentation says:
If set, every frame, trackObject's position is read and assigned to the scene's position, so that the scene follows the trackObject.
I believe it does, but the camera is called the Renderer in PBE. You can set the position of the Renderer to make it track a player.
精彩评论