#ifndef PARTY_H_826F91BA #define PARTY_H_826F91BA #include "system.h" #include "direction.h" #include "timer.h" #include "sprite.h" class Mixer; class Game; class Input; class CharacterSystem : public System { public: static constexpr SystemKey Key = SystemKey::Character; CharacterSystem(Game& game) : game_(game) {} void initSprite(int spriteId, int movementSpeed); void tick(double dt) override; void addSpriteToParty(int leaderId, int followerId); void transplantParty(int leaderId, vec2i pos, Direction dir); void breakUpParty(int leaderId); void moveInDirection(int spriteId, Direction dir); void stopDirecting(int spriteId); void beginCrouch(int spriteId); void endCrouch(int spriteId); void startRunning(int spriteId); void halt(int spriteId); void destroySprite(int spriteId) override; private: void stopRunning(int spriteId); void setPartyState(int spriteId, CharacterState state); void stopRunningSound(Sprite& sprite); // state should be the party leader's state void setAnimationFor(int spriteId, CharacterState state); void adjustPartyTrails(int spriteId); Game& game_; Timer inputTimer_ {33}; }; #endif /* end of include guard: PARTY_H_826F91BA */