blob: ce301fde9659d07307daf6e37f325effe5749aa3 (
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 / 1.8;
static constexpr int RANGE = GAME_HEIGHT / 4;
static constexpr int MIN_RANGE = -RANGE;
static constexpr int MAX_RANGE = RANGE;
public:
void init();
bool on_event(const MissileSpawnEvent & ev);
};
|