building creation/replace/destroy
This commit is contained in:
30
choco.lua
30
choco.lua
@@ -1,10 +1,10 @@
|
||||
function _init()
|
||||
world_init()
|
||||
playercontroler_init()
|
||||
worldtiles = {}
|
||||
end
|
||||
|
||||
function _update()
|
||||
if (btnp(5)) compute_effect_array(worldtiles)
|
||||
world_update()
|
||||
playercontroler_update()
|
||||
end
|
||||
|
||||
@@ -12,7 +12,29 @@ function _draw()
|
||||
cls(0)
|
||||
map(0, 0, 0, 8, 64, 64)
|
||||
camera(0,0)
|
||||
draw_array(worldtiles)
|
||||
draw_ressource_bar()
|
||||
world_draw()
|
||||
playercontroler_draw()
|
||||
end
|
||||
end
|
||||
|
||||
ressources =
|
||||
{
|
||||
fruits =
|
||||
{
|
||||
quantity = 5,
|
||||
sprite = 33,
|
||||
x = 70
|
||||
},
|
||||
money =
|
||||
{
|
||||
quantity = 100,
|
||||
sprite = 35,
|
||||
x = 0
|
||||
},
|
||||
jam =
|
||||
{
|
||||
quantity = 0,
|
||||
sprite = 34,
|
||||
x = 100
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user