aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.h
blob: b1e6a9527f60e98064140e6a816aabd33ccd34e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

namespace crepe {
class ScriptSystem;
}

namespace crepe::api {

class Script {
	friend class crepe::ScriptSystem;
protected:
	virtual void init() {}
	virtual void update() {}
	// NOTE: additional *events* (like unity's OnDisable and OnEnable) should be
	// implemented as member methods in derivative user script classes and
	// registered in init(), otherwise this class will balloon in size with each
	// added event.
};

}