sfx
This commit is contained in:
parent
bce506d721
commit
6b37fa56aa
25
toomgis.p8
25
toomgis.p8
@ -97,6 +97,10 @@ function add2body(n)
|
|||||||
pieces += 1
|
pieces += 1
|
||||||
add(tbody, {n=n, r=toomgis_radius() + rnd(7), off=rnd(4)})
|
add(tbody, {n=n, r=toomgis_radius() + rnd(7), off=rnd(4)})
|
||||||
end
|
end
|
||||||
|
-- growth chomp every 10
|
||||||
|
if pieces % 10 == 0 then
|
||||||
|
sfx(6)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function hitbody()
|
function hitbody()
|
||||||
@ -180,6 +184,8 @@ function level_draw()
|
|||||||
-- each level is 3tl/24px
|
-- each level is 3tl/24px
|
||||||
cls(lvl.sky)
|
cls(lvl.sky)
|
||||||
--- zoom should go from 16 to 2 w/ growth
|
--- zoom should go from 16 to 2 w/ growth
|
||||||
|
--local pieces_step = flr(pieces / 10)
|
||||||
|
--local zoom = 16 - (14 * (pieces_step / (MAX_PIECES / 10)))
|
||||||
local zoom = 16 - (14 * (pieces / MAX_PIECES))
|
local zoom = 16 - (14 * (pieces / MAX_PIECES))
|
||||||
local h=24 * zoom
|
local h=24 * zoom
|
||||||
for y=0,h do
|
for y=0,h do
|
||||||
@ -194,10 +200,23 @@ function level_draw()
|
|||||||
spr(item.n, item.x-px, item.y)
|
spr(item.n, item.x-px, item.y)
|
||||||
-- collider
|
-- collider
|
||||||
-- circ(item.x-px+4, item.y+4, 4, 8)
|
-- circ(item.x-px+4, item.y+4, 4, 8)
|
||||||
|
-- stink
|
||||||
|
if item.n > 16 then
|
||||||
|
draw_stink(item.x-px, item.y)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--printh(dist(px-20, py, item.x, item.y))
|
-- hud
|
||||||
|
local size = max(flr(pieces/MAX_PIECES*100), 1)
|
||||||
|
print(size.."CM GOAL: 100CM", 20, 1, 14)
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_stink(x, y)
|
||||||
|
local step = flr(2*time()) % 3 - 1
|
||||||
|
line(x+1, y-2, x+1 + step, y-7, 3)
|
||||||
|
line(x+3, y-2, x+3 + step, y-7, 3)
|
||||||
|
line(x+6, y-2, x+5 + step, y-7, 3)
|
||||||
end
|
end
|
||||||
|
|
||||||
function level_upd()
|
function level_upd()
|
||||||
@ -236,6 +255,7 @@ function level_upd()
|
|||||||
if d < toomgis_radius() and item.n != 0 then
|
if d < toomgis_radius() and item.n != 0 then
|
||||||
-- item collision
|
-- item collision
|
||||||
if item.n > 16 then
|
if item.n > 16 then
|
||||||
|
sfx(5)
|
||||||
hitbody()
|
hitbody()
|
||||||
else
|
else
|
||||||
add2body(item.n)
|
add2body(item.n)
|
||||||
@ -399,6 +419,9 @@ __sfx__
|
|||||||
001400000010000150001500015000100001500010002150001000015000150001500010000150001000215000100001500015000150001000015000100021500010000150001500015000100001500010005150
|
001400000010000150001500015000100001500010002150001000015000150001500010000150001000215000100001500015000150001000015000100021500010000150001500015000100001500010005150
|
||||||
001400000a0500c0500c0500a050050500705007050050500a0500c0500c0500a0500c0500f0500f0500c05011050130501305011050130501605016050130501d0501b0501b0501d0501b05018050180501b050
|
001400000a0500c0500c0500a050050500705007050050500a0500c0500c0500a0500c0500f0500f0500c05011050130501305011050130501605016050130501d0501b0501b0501d0501b05018050180501b050
|
||||||
361400000050200502275520050200502275520050200502275522455027552005022755227500275522455227550275002755227500275002755227500275002755224550275522750027552245522455222552
|
361400000050200502275520050200502275520050200502275522455027552005022755227500275522455227550275002755227500275002755227500275002755224550275522750027552245522455222552
|
||||||
|
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0003000000503165531d5532155324553265532655325553225531e5531a5531855317553195531e5532055323553255532555325553255532555324553235532355322553215531d5531a5531a5531a55319553
|
||||||
|
010300002405324053240532405309053090530905309053240532405324053240530d0530d0530d0530d053240532405324053240530a0530a0530a0530a053240532405324053240530b0530b0530b0530b053
|
||||||
__music__
|
__music__
|
||||||
01 01424344
|
01 01424344
|
||||||
00 01024344
|
00 01024344
|
||||||
|
Loading…
Reference in New Issue
Block a user