blob: cc3184eb16e1139d3adff9389a58363f8d66d673 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <crepe/api/Event.h>
#include <crepe/api/Script.h>
#include <crepe/util/OptionalRef.h>
#include <crepe/api/Animator.h>
#include <crepe/api/Sprite.h>
class PrevPlayerScript : public crepe::Script {
private:
crepe::OptionalRef<crepe::Animator> head_anim;
crepe::OptionalRef<crepe::Animator> body_anim;
crepe::OptionalRef<crepe::Sprite> head;
crepe::OptionalRef<crepe::Sprite> body;
private:
float move_speed = 100;
private:
void init();
void fixed_update(crepe::duration_t dt);
bool key_pressed(const crepe::KeyPressEvent & ev);
};
|