You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Ah, right, I remember now. I also put my enums under some Enums file/class and I need to write "Enum.MyEnum/ENUM_VALUE" each time. It's the same in C# where you cannot have a wild enum, although you can at least use using to avoid prefixing with a class/namespace each time.
So yes, it would look like this. The only shortcut we can take is BTTickResult.BTResult.SUCCESS -> BTTickResult.SUCCESS (skipping enum name). I don't have a better idea at the moment...
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.
The text was updated successfully, but these errors were encountered: