Skip to content

Body slopes variable. #13

@IkonOne

Description

@IkonOne

The slopes variable added to the Body class is a dynamic object. These are unusable in typescript as they will throw errors when trying to access their member variables(unless you use ['array'] access). This commit I created some classes in the typescript definition so that the variables are properly accessible: IkonOne@df06dc6

The added classes are BodySlopes and BodySlopesSat. I think that an approach like this is ok for now. If you agree with this approach, I can convert the objects in the JS code to classes as well as you mentioned the possibility of here: https://github.com/hexus/phaser-arcade-slopes/blob/master/src/ArcadeSlopes/Facade.js#L87

The two classes needed could possibly go in a new file called BodyMods.js or something.

Also, since the sat variable is only used to store the responses, maybe simply having a collision or response variable might be a better fit.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions