aboutsummaryrefslogtreecommitdiff
path: root/game/missile/SpawnEvent.h
blob: 84b19870b461fa41248943d90da4dbf16bc3a7c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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 MIN_RANGE = -150;
	static constexpr int MAX_RANGE = 150;

public:
	void init();
	bool on_event(const MissileSpawnEvent & ev);
};