All Questions


posted to: The Idle state

Trying to solve the autocompletion issue cause of circle reference

State has only Interface which StateMachine referes to.

AbstractState contains public properties and methods.

Other States such as Run/Idle extends from AbstractState.

For now it works perfactly.  But I'm not sure is there any potential problems in these codes.

  • Nathan Lovato replied

    No problems with this, except personally I prefer not to add extra files and remove type hints when it gives circle references for now.

    Godot 4 and GDScript 2 should resolve this issue once and for all.