example building 2
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+8
-7
@@ -35,6 +35,7 @@ errorret_t rpgInit(void) {
|
||||
assertTrue(entIndex != 0xFF, "No available entity slots!.");
|
||||
entity_t *ent = &ENTITIES[entIndex];
|
||||
entityInit(ent, ENTITY_TYPE_PLAYER);
|
||||
ent->position = (worldpos_t){ 10, 2, 0 };
|
||||
RPG_CAMERA.mode = RPG_CAMERA_MODE_FOLLOW_ENTITY;
|
||||
RPG_CAMERA.followEntity.followEntityId = ent->id;
|
||||
{
|
||||
@@ -48,7 +49,7 @@ errorret_t rpgInit(void) {
|
||||
entity_t *npc = &ENTITIES[npcIndex];
|
||||
entityInit(npc, ENTITY_TYPE_NPC);
|
||||
npcSetMoveType(npc, NPC_MOVE_TYPE_PATH);
|
||||
npc->position = (worldpos_t){ 3, 3, 0 };
|
||||
npc->position = (worldpos_t){ 8, 8, 0 };
|
||||
npc->interact.type = ENTITY_INTERACT_PRINT;
|
||||
npc->interact.data.message = "hello world";
|
||||
{
|
||||
@@ -58,12 +59,12 @@ errorret_t rpgInit(void) {
|
||||
if(ci != -1) entitySetChunk(npc, (uint8_t)ci);
|
||||
}
|
||||
|
||||
npcpath_t *path = &npc->data.npc.moveData.path;
|
||||
path->positions[0] = (worldpos_t){ 3, 3, 0 };
|
||||
path->positions[1] = (worldpos_t){ 10, 3, 0 };
|
||||
path->positions[2] = (worldpos_t){ 10, 10, 0 };
|
||||
path->positions[3] = (worldpos_t){ 3, 10, 0 };
|
||||
path->count = 4;
|
||||
// npcpath_t *path = &npc->data.npc.moveData.path;
|
||||
// path->positions[0] = (worldpos_t){ 3, 3, 0 };
|
||||
// path->positions[1] = (worldpos_t){ 10, 3, 0 };
|
||||
// path->positions[2] = (worldpos_t){ 10, 10, 0 };
|
||||
// path->positions[3] = (worldpos_t){ 3, 10, 0 };
|
||||
// path->count = 4;
|
||||
|
||||
// All Good!
|
||||
errorOk();
|
||||
|
||||
Reference in New Issue
Block a user