summaryrefslogtreecommitdiff
path: root/example/example.cpp
blob: b870806c2f1baa61bd1825d87374c171a6c3be65 (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

#include "example.hpp"

#include "components.hpp"

void OnEntityTypeCollision(const EntityHandle &lhs, const EntityHandle &rhs) {
	fprintf(stdout, "[Example::OnEntityTypeCollision] Called\n");
}

void OnEntityCollision(const EntityHandle &lhs, const EntityHandle &rhs) {
	fprintf(stdout, "[Example::OnEntityCollision] Called\n");
}

void OnInit() {
	PkeArray_Add(&pkePluginCallbacks, PkeCallback {
		.name = "OnEntTypeColl",
		.func = reinterpret_cast<void *>(OnEntityTypeCollision),
	});
	PkeArray_Add(&pkePluginCallbacks, PkeCallback {
		.name = "OnEntColl",
		.func = reinterpret_cast<void *>(OnEntityCollision),
	});
}

PKEPluginInterface pkePluginInterface {
	.OnInit = OnInit,
};