Files

26 lines
493 B
Plaintext

var screenWidth = 1280;
var screenHeight = 720;
var screenCaption = "Hello raylib from Toy!";
var frameCounter: Int = 0;
var posCounter: Int = 0;
//this runs before the game starts
fn onReady() {
loadMonsterSprite("parvati", "assets/parvati.png", 32, 32);
}
//this runs each frame
fn onStep() {
frameCounter++;
if (frameCounter % 100 == 0) {
spawnMonsterAt("parvati", posCounter*50, posCounter*50);
posCounter++;
}
}
//this runs as the game is closing down
fn onFinished() {
//
}