entity dir
This commit is contained in:
@@ -13,12 +13,17 @@ map_t testMap;
|
||||
|
||||
void rpgInit() {
|
||||
mapInit(&testMap);
|
||||
testMap.width = 2;
|
||||
testMap.height = 2;
|
||||
for(uint32_t i = 0; i < testMap.width * testMap.height; i++) {
|
||||
testMap.base.tiles[i].id = 1;
|
||||
}
|
||||
|
||||
entity_t *ent = mapEntityAdd(&testMap);
|
||||
entityInit(ent, ENTITY_TYPE_PLAYER);
|
||||
entityInit(ent, ENTITY_TYPE_PLAYER, &testMap);
|
||||
|
||||
entity_t *npc = mapEntityAdd(&testMap);
|
||||
entityInit(npc, ENTITY_TYPE_NPC);
|
||||
entityInit(npc, ENTITY_TYPE_NPC, &testMap);
|
||||
npc->position[0] = 32.0f;
|
||||
npc->position[1] = 32.0f;
|
||||
}
|
||||
|
Reference in New Issue
Block a user