initial add
This commit is contained in:
commit
c5263a0d78
1
bunny.jso
Normal file
1
bunny.jso
Normal file
|
@ -0,0 +1 @@
|
|||
self.add_component(component.sprite, {path:"bunny.png"});
|
31
game.js
Normal file
31
game.js
Normal 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
4
project.prosperon
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": "0.4.0",
|
||||
"revision": "9d93f603"
|
||||
}
|
Loading…
Reference in a new issue