#include "example.hpp" #include "pk.h" void OnEntityTypeCollision(const void *lhs, const void *rhs) { (void)lhs; (void)rhs; fprintf(stdout, "[Example::OnEntityTypeCollision] Called\n"); } void OnEntityCollision(const void *lhs, const void *rhs) { (void)lhs; (void)rhs; fprintf(stdout, "[Example::OnEntityCollision] Called\n"); } void OnInit() { // create/register entity types pkePluginInterface.PkeEntityInterfaceCount = 1; pkePluginInterface.PkeEntityInterface = pk_new_arr(1); // set up entity types auto *typeIntfs = reinterpret_cast(pkePluginInterface.PkeEntityInterface); typeIntfs[0].OnEntityTypeCollision = reinterpret_cast(OnEntityTypeCollision); typeIntfs[0].OnEntityInstanceCollision = reinterpret_cast(OnEntityCollision); } PKEPluginInterface pkePluginInterface { .OnInit = OnInit, };