aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/BattleScript.h
blob: f91c597ddf05718b6c09e9a9a0da965ee66db9c2 (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
#pragma once

#include <crepe/api/Script.h>
#include <crepe/api/BehaviorScript.h>
#include <crepe/api/Event.h>
#include <random>
struct BattleWonEvent : public crepe::Event{

};

struct BattleStartEvent : public crepe::Event{
	public: 
	int num_enemies = 0;
};
class BattleScript : public crepe::Script{
	public:
	BattleScript();
	void init() override;
	void fixed_update(crepe::duration_t dt) override;
	private:
	bool battle_active = false;
	std::random_device rd;
	std::default_random_engine engine;
	bool create_battle(const BattleStartEvent& e);
};