functioning prototype
This commit is contained in:
parent
f761d1a172
commit
7ff5cf97ad
@ -6,31 +6,33 @@ __lua__
|
|||||||
|
|
||||||
function _draw()
|
function _draw()
|
||||||
cls()
|
cls()
|
||||||
-- draw_placeholder()
|
draw_hud_placeholder()
|
||||||
draw_weap_opt(0,0,frame_col(false),1,"hull","\n +1\n max\nhealth")
|
draw_weap_opt(0,0,frame_col(item==1),1,"hull","\n +1\n max\nhealth")
|
||||||
draw_weap_opt(56,0,frame_col(true),2,"vulc"," rate\n\n faster\n firing\n rate")
|
draw_weap_opt(56,0,frame_col(item==2),2,"vulc"," rate\n\n faster\n firing\n rate")
|
||||||
draw_rearm(frame_col(false))
|
draw_rearm(frame_col(item<0))
|
||||||
end
|
end
|
||||||
|
|
||||||
function draw_placeholder()
|
function _init()
|
||||||
-- hud placeholder
|
item=1
|
||||||
|
bfm=1
|
||||||
|
end
|
||||||
|
|
||||||
|
function _update()
|
||||||
|
if (btn(3) and item > 0 or btn(2) and item < 0) item = -item
|
||||||
|
if (btn(0)) item = 1
|
||||||
|
if (btn(1)) item = 2
|
||||||
|
if (btn() & 0xF ~= 0) and bfm >= 10 or bfm >= 30 then
|
||||||
|
bfm = 1
|
||||||
|
else
|
||||||
|
bfm += 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_hud_placeholder()
|
||||||
rectfill(112, 0, 127, 127,0x56)
|
rectfill(112, 0, 127, 127,0x56)
|
||||||
rect(112,0,127,127,7)
|
rect(112,0,127,127,7)
|
||||||
line(127,1,127,127,5)
|
line(127,1,127,127,5)
|
||||||
line(113,127)
|
line(113,127)
|
||||||
|
|
||||||
glow_box(0, 0, 55, 100, {4, 10}, 1)
|
|
||||||
glow_box (0, 101, 111, 127, {4, 10}, 1)
|
|
||||||
if t()%1>0.5 then
|
|
||||||
glow_box(56, 0, 111, 100, {14, 7}, 1)
|
|
||||||
else
|
|
||||||
glow_box(56, 0, 111, 100, {2, 8}, 1)
|
|
||||||
end
|
|
||||||
print("■ full ammo\n■ full shield\n■ +50% health", 5, 106, 6)
|
|
||||||
-- rect(4, 4, 123, 123, 4)
|
|
||||||
-- rect(5, 5, 122, 122, 10)
|
|
||||||
-- rect(6, 6, 121, 121, 4)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function glow_box(x0, y0, x1, y1, c, cf)
|
function glow_box(x0, y0, x1, y1, c, cf)
|
||||||
@ -47,7 +49,7 @@ end
|
|||||||
|
|
||||||
function frame_col(hot)
|
function frame_col(hot)
|
||||||
if (not hot) return {4,10}
|
if (not hot) return {4,10}
|
||||||
if (t()%1>0.5) return {14,7}
|
if (bfm<=16) return {14,7}
|
||||||
return {2,8}
|
return {2,8}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,8 +64,8 @@ end
|
|||||||
|
|
||||||
function draw_rearm(c)
|
function draw_rearm(c)
|
||||||
glow_box(0,101,111,127,c,1)
|
glow_box(0,101,111,127,c,1)
|
||||||
spr(5,4,105,4,2)
|
spr(5,15,107,4,2)
|
||||||
print("■ full ammo\n■ full shield\n■ +50% health",40, 106, 6)
|
print("full ammo\nfull shield\n+50% health",54, 106, 6)
|
||||||
end
|
end
|
||||||
|
|
||||||
__gfx__
|
__gfx__
|
||||||
|
Loading…
Reference in New Issue
Block a user