blob: 6aee8b23d20e4e7b9bfd7e450bd160717a39ee00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <crepe/api/Script.h>
#include "ZapperObject.h"
#include "util/OptionalRef.h"
class ZapperPoolSubScene;
class ZapperPoolScript : public crepe::Script {
public:
ZapperPoolScript(std::vector<ZapperObject> && pool);
void init();
void fixed_update(crepe::duration_t);
unsigned i = 0;
private:
std::vector<ZapperObject> pool;
private:
crepe::OptionalRef<crepe::Transform> camera_transform;
crepe::OptionalRef<crepe::Camera> camera_camera;
crepe::OptionalRef<ZapperObject> get_next_zapper();
private:
void spawn_random();
private:
static constexpr float OFFSCREEN_MARGIN = 40;
};
|