Renamed code 'Monster' -> 'Actor'

This commit is contained in:
2026-05-08 11:55:36 +10:00
parent 641145c5b4
commit 07c7b1b443
4 changed files with 115 additions and 140 deletions
+5 -5
View File
@@ -3,14 +3,14 @@ var frameCounter: Int = 0;
var posCounter: Int = 0;
fn onReady() {
loadMonsterSprite("monster", "assets/parvati.png", 32, 32);
loadSprite("zombie", "assets/parvati.png", 32, 32);
}
fn onStep() {
frameCounter++;
if (frameCounter % 100 == 0) {
spawnMonsterAt("monster", posCounter*50, posCounter*50);
spawnActorAt("zombie", posCounter*50, posCounter*50);
posCounter++;
}
}
@@ -24,8 +24,8 @@ initScreen(1280, 720, "Hello raylib from Toy!");
initLoop(onReady, onStep, onClose);
//test
fn brains(monster: Opaque) {
monster.setX(monster.x + 1);
fn brains(actor: Opaque) {
actor.setX(actor.x + 1);
}
setMonsterStep(brains);
setActorStep(brains);