-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi,I mean camara feauture is camera's follow ,not ordinary's camera #30
Comments
What you could do is have a Camera component that centers the parent sprite onto the character in its onUpdate. I'm working on a platformer game and doing something similar. |
ok,and one more question.how about multiple camera ? such like http://flixel.org/features.html#cameras |
Oh, I see. flambe.platform.DrawVisitor should be moved to the public API to make this possible. I'm planning to do this anyways for issue #11 :) |
I'm going to mark this as closed, as it's now trivial for users to implement cameras by using Sprite.render() and scissor rectangles. |
any demo or democode for these feature? |
I'm pretty sure all you want is something like this (untested): class ViewSprite extends Sprite
{
public function new (view :Entity)
{
_view = view;
}
override public function draw (g :Graphics)
{
Sprite.render(_view, g);
}
private var _view :Entity;
} Then you can create multiple ViewSprites that share the same view, and you can position and scissor them individually. |
hi,I try to mean camara feauture is camera's follow ,not ordinary's camera
example ,from some 2d game like Mario,the camera always target mario when him moving ...
The text was updated successfully, but these errors were encountered: