initial add

This commit is contained in:
John Alanbrook 2024-04-23 15:59:25 -05:00
commit c5263a0d78
4 changed files with 36 additions and 0 deletions

1
bunny.jso Normal file
View file

@ -0,0 +1 @@
self.add_component(component.sprite, {path:"bunny.png"});

BIN
bunny.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

31
game.js Normal file
View file

@ -0,0 +1,31 @@
prosperon.draw = function()
{
os.sprite_pipe();
render.set_sprite_tex(bun);
for (var i = 0; i < obs.length; i++)
mysprite.draw(obs[i]);
render.sprite_flush();
}
var bun = os.make_texture("bunny.png");
var mysprite = os.sprite();
say(mysprite.spriteoffset);
say(mysprite.spritesize);
say(mysprite.scale);
var obs = [];
for (var i = 0; i < 5; i++) {
var o = os.make_gameobject();
o.pos = [Math.random()*50-25, Math.random()*50-25];
o.phys = 2;
obs.push(o);
}
this.gui = function()
{
render.text(`fps: ${fps()}`, [0,0]);
}

4
project.prosperon Normal file
View file

@ -0,0 +1,4 @@
{
"version": "0.4.0",
"revision": "9d93f603"
}