blob: 3b9638c9f2eb0c9026d27c39d0ffdcc687cb432a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#pragma once
#include <crepe/api/Event.h>
#include <crepe/api/Script.h>
#include "../Config.h"
struct MissileSpawnEvent : public crepe::Event {};
class MissileSpawnEventHandler : public crepe::Script {
private:
static constexpr int MISSILE_OFFSET = VIEWPORT_X;
static constexpr int RANGE = GAME_HEIGHT / 4.5;
static constexpr int MIN_RANGE = -RANGE;
static constexpr int MAX_RANGE = RANGE;
public:
void init();
bool on_event(const MissileSpawnEvent & ev);
};
|