#include #include #include #include #include #include #include class PrevPlayerScript : public crepe::Script { private: crepe::OptionalRef head_anim; crepe::OptionalRef body_anim; crepe::OptionalRef head; crepe::OptionalRef body; private: float move_speed = 100; private: void init(); void fixed_update(crepe::duration_t dt); bool key_pressed(const crepe::KeyPressEvent & ev); private: bool on_key_down(const crepe::KeyPressEvent & ev); bool on_key_up(const crepe::KeyReleaseEvent & ev); void help_kick(const crepe::vec2 & direction); private: float & engine_gravity = crepe::Config::get_instance().physics.gravity; crepe::OptionalRef rb; };