Skip to content

Suggestion: replace int with strongly-typed enum BTTickResult where relevant #33

@hsandt

Description

@hsandt

I noticed that whenever a BTTickResult is expected, int is used instead as in Godot 3, but it makes it harder to understand code intention and ensure type safety. So it would be better to use enum type BTTickResult instead.

It may break compatibility with existing code though. For instance, BTActionCallable.tick would not be able to accept functions returning int.

However, if all users were meaning to manipulating enum BTTickResult anyway, they will just have to upgrade their code to change int to BTTickResult.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions