Closed eh-jogos closed 1 year ago
Looks good. Want me to merge or want to wait until you've done the enemy Commander running away? In fact, happy to split that into another Issue, as it will likely require work related to #16 or #15 , so might be better to tackle the whole problem, rather than only a specific use case.
Yeah, I think it's better to merge this one! Creating a separate Issue for commander running away seems better!
Commander actions:
Limitations
states_base_folder
parameter to StateMachine's_init
so we can override the base folderadd_state
uses, but I think this needs to be a "per state" path, because for example,player_actor/dead.gd
andactor/dead.gd
are essentially the same, but I have to duplicate them becauseadd_state
will only search in a single folder. If we could set the path for each state we could mix and match states from compatible units, or states that are the same regardless of unit.Implementation
A lot of stuff happened on the commits bellow, but the overview is:
Some other important changes among the commits below that I remember:
factory.gd
a bit, so that it is a bit more DRY compared to how I had left it before when I addedcreate_player_actor()
path_base_sprites
to red_data so that we can easily change the path for sprites_attempt_target_refresh
would restart the timer right after