stuff
This commit is contained in:
29
choco.lua
29
choco.lua
@@ -1,9 +1,24 @@
|
|||||||
|
|
||||||
ressources =
|
ressources =
|
||||||
{
|
{
|
||||||
fruits = 0,
|
fruits =
|
||||||
money = 100,
|
{
|
||||||
jam = 0
|
quantity = 5,
|
||||||
|
sprite = 33,
|
||||||
|
x = 70
|
||||||
|
},
|
||||||
|
money =
|
||||||
|
{
|
||||||
|
quantity = 100,
|
||||||
|
sprite = 35,
|
||||||
|
x = 0
|
||||||
|
},
|
||||||
|
jam =
|
||||||
|
{
|
||||||
|
quantity = 0,
|
||||||
|
sprite = 34,
|
||||||
|
x = 100
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -25,8 +40,16 @@ function _draw()
|
|||||||
map(0, 0, 0, 8, 64, 64)
|
map(0, 0, 0, 8, 64, 64)
|
||||||
camera(0,0)
|
camera(0,0)
|
||||||
draw_array(worldtiles)
|
draw_array(worldtiles)
|
||||||
|
draw_ressource_bar()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function draw_ressource_bar()
|
||||||
|
rectfill(0, 0, 127, 7, 1)
|
||||||
|
for _,res in pairs(ressources) do
|
||||||
|
spr(res.sprite, res.x, 0)
|
||||||
|
print(res.quantity, res.x + 8, 1, 6)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function updatecycle()
|
function updatecycle()
|
||||||
|
|||||||
Reference in New Issue
Block a user