Skip to content

Initialize Nape once in nape demos #379

@Geokureli

Description

@Geokureli

Continued from: HaxeFlixel/flixel-addons#465 (comment)

The FlxNape demo is broken because of this. Each of its demos is a different state, and each state calls FlxNapeSpace.init(). By switching the demo you're on a couple of times, there's going to be multiple instances of FlxNapeSpace updating the Nape space, causing physics to speed up. You can't even see all of the demos as they're intended to be, because when you switch to the second one, the physics are being updated twice instead of once and so on.

We potentially need to change the following demos:
https://haxeflixel.com/demos/FlxNape/
https://haxeflixel.com/demos/FlxNapeTerrain/
https://haxeflixel.com/demos/FlxNapeTilemap/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions