aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/BehaviorScript.h
blob: 756c2cae508372e3db7414e5591ecf965f26a3dc (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
34
35
#pragma once

#include <memory>

#include "../Component.h"

namespace crepe {
class ScriptSystem;
class ComponentManager;
}

namespace crepe::api {

class Script;

class BehaviorScript : public Component {
protected:
	friend class crepe::ComponentManager;
	BehaviorScript();
public:
	virtual ~BehaviorScript() = default;

public:
	template<class T>
	BehaviorScript & set_script();

protected:
	friend class crepe::ScriptSystem;
	std::unique_ptr<Script> script = nullptr;
};

}

#include "BehaviorScript.hpp"