This will allow you to create your own FollowStyle for the camera (perhaps you want it to pan easily whenever something moves instead of "jumping" immediately to the correct position?
And if you want a custom deadzone, you would either extend the class, or call something like camera.follow(target, new FollowStyle(cutomDeadzone));.
But primarily, it will use things like FollowStyle.LOCKON, and second, it will reduce the code in FlxCamera#follow() to something like:
public function follow(Target:FlxBasic, followStyle:FollowStyle):void
{
target = Target;
deadzone = followStyle.getDeadzone(this, target);
}
Bleh, maybe it's just easier to show these proposed changes with actual code once we get to that point. This is probably the least clear suggestion I have written so far. :/
This will allow you to create your own
FollowStylefor the camera (perhaps you want it to pan easily whenever something moves instead of "jumping" immediately to the correct position?And if you want a custom deadzone, you would either extend the class, or call something like
camera.follow(target, new FollowStyle(cutomDeadzone));.But primarily, it will use things like
FollowStyle.LOCKON, and second, it will reduce the code inFlxCamera#follow()to something like:Bleh, maybe it's just easier to show these proposed changes with actual code once we get to that point. This is probably the least clear suggestion I have written so far. :/