Moonwards-Virtual-Moon
Moonwards-Virtual-Moon copied to clipboard
Refactor vertical stairs interactor to control the character directly
This is as opposed to the character containing the stairs climbing code.
See #575 - ensure proper alignment of the player.
@Reousa Does that really make sense? I climb the stairs irl. The stairs don't make me climb. We could potentially have a stairs component in the HumanPlayer.tscn. Do you want me to include this issue with my stair fix I will be making?
It's not in terms of gameplay, but rather programability & abstraction.
Imagine having multiple controllers that all need to climb the stairs? We'd then need to either
- Create the same functionality over and over for each
- Have to fit them to a specific base script
Generally speaking what I intend here is for the stairs to be in control code-wise. That is to say a few criteria would be met:
- The climber has a climb animation
- The climber is of a specific type
- The climber can climb
From there the stairs script would do the rest. This is to also alleviate the bloat in our MovementController. This would also work for anything similiar to the stairs, that makes the player do a certain behavior outside of it's core behaviors.
Finally, not following this logic end up in us implementing everything in the MovementController - if we want to be consistent, which needless to say would become as spaghetti as can be 🍝
I meant more so make either a unique component that handles stair climbing or make it where there are plugins so to speak in HumanoidMovement. One of them would be Stair climbing. We would just have an api that let us call the script/plugin that is in charge of that movement. If the entity did not have the script/plugin then nothing would happen.
This could make it easier for people to see at a glance what the entity they are working with it capable of. Just offering that as an option.