In this chapter we set up the enumerations for the player character's equip state, in my case AEchoCharacter. I declared my enumerations in a separate header file CharacterState.h which can also be used for other states besides equipping items: Alive/Dead, Climbing/Swimming etc. I decided to specify my enum encapsulation as ECharacterEquipState.
Although I didn't fully agree with making the character variable private, I went along and will do all my state logic under the AEchoCharacter hood, using a const GetCharacterEquipState() getter.
I ran into an issue when adding it to the Animation Instance, as it had been written using the parent class's pointer ACharacter, casting an to it, I had to update the header pointer to AEchoCharacter so that I could call EchoCharacter->GetCharacterEquipState().
Top comments (0)