Monster spawning is controlled from the scripts

This commit is contained in:
2026-05-01 18:45:40 +10:00
parent 502dab670e
commit a45b2e71af
5 changed files with 256 additions and 19 deletions
+5 -13
View File
@@ -1,17 +1,9 @@
#pragma once
#include "raylib.h"
#include "toy_vm.h"
//sprites loaded from disk
typedef struct MonsterSprite {
Texture2D texture;
Rectangle rect;
} MonsterSprite;
//Monsters loaded from scripts
typedef struct MonsterData {
MonsterSprite* sprite;
Vector2 position;
int health;
} MonsterData;
//object pool system
void initMonsterObjectPool(Toy_VM* vm);
void freeMonsterObjectPool(Toy_VM* vm);
void drawMonsterPool(Toy_VM* vm);