Compare commits
3 Commits
9333c03bf3
...
gun_upgrad
Author | SHA1 | Date | |
---|---|---|---|
b7c3e6ee92
|
|||
c91e5f4bd1
|
|||
ea2ddadb15
|
@ -761,15 +761,13 @@ between each
|
|||||||
shot when
|
shot when
|
||||||
firing.
|
firing.
|
||||||
|
|
||||||
fractions
|
|
||||||
not shown,
|
|
||||||
but they
|
|
||||||
add up.
|
|
||||||
|
|
||||||
is: ]]..tostr(c)..[[f
|
is: ]]..tostr(c)..[[f
|
||||||
minus: ]]..tostr(c-newc)..[[f
|
minus: ]]..tostr(c-newc)..[[f
|
||||||
----------
|
----------
|
||||||
total: ]]..tostr(newc).."f",
|
total: ]]..tostr(newc)..[[f
|
||||||
|
|
||||||
|
remainder:
|
||||||
|
]]..sub(tostr(newc-rawnewc),0,5),
|
||||||
action=function()
|
action=function()
|
||||||
self.cooldown=newc>>16
|
self.cooldown=newc>>16
|
||||||
self.cd_remainder=newc-rawnewc
|
self.cd_remainder=newc-rawnewc
|
||||||
@ -1201,7 +1199,7 @@ from further
|
|||||||
self.magnet += 2
|
self.magnet += 2
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
self.main_gun.rate_upgrade_opt(),
|
self.main_gun:rate_upgrade_opt(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if cdr > 0 then
|
if cdr > 0 then
|
||||||
@ -1908,7 +1906,7 @@ end
|
|||||||
rearm_mode = mknew{
|
rearm_mode = mknew{
|
||||||
sel=1,
|
sel=1,
|
||||||
bfm=1,
|
bfm=1,
|
||||||
crt_frm = 1,
|
crt_frm = 0,
|
||||||
pos=-1,
|
pos=-1,
|
||||||
init=function(this)
|
init=function(this)
|
||||||
poke(0x5f5c, 255) --no btnp repeat
|
poke(0x5f5c, 255) --no btnp repeat
|
||||||
@ -1923,7 +1921,7 @@ function rearm_mode:glow_box(x0, y0, x1, y1, c, cf)
|
|||||||
i -= 1
|
i -= 1
|
||||||
rect(x0+i,y0+i,x1-i,y1-i,v)
|
rect(x0+i,y0+i,x1-i,y1-i,v)
|
||||||
end
|
end
|
||||||
fillp(crt[self.crt_frm&0xff])
|
fillp(crt[1+(self.crt_frm&7)])
|
||||||
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
||||||
fillp()
|
fillp()
|
||||||
end
|
end
|
||||||
@ -1955,7 +1953,7 @@ end
|
|||||||
|
|
||||||
function rearm_mode:draw_option(id)
|
function rearm_mode:draw_option(id)
|
||||||
local rec = self.options[id]
|
local rec = self.options[id]
|
||||||
self:glow_box(0,0,55,100,self:frame_col(self.sel == id),1)
|
self:glow_box(0,0,55,101,self:frame_col(self.sel == id),1)
|
||||||
spr(rec.icon,5, 5)
|
spr(rec.icon,5, 5)
|
||||||
print(rec.hdr, 13, 8, 7)
|
print(rec.hdr, 13, 8, 7)
|
||||||
print(rec.body, 5, 15, 6)
|
print(rec.body, 5, 15, 6)
|
||||||
@ -1991,9 +1989,9 @@ function rearm_mode:draw()
|
|||||||
camera(frac * -128 + (1-frac) * -56, 0)
|
camera(frac * -128 + (1-frac) * -56, 0)
|
||||||
self:draw_option(2)
|
self:draw_option(2)
|
||||||
camera(0, -28 * frac)
|
camera(0, -28 * frac)
|
||||||
self:glow_box(0,101,111,127,self:frame_col(self.sel < 0),1)
|
self:glow_box(0,102,111,127,self:frame_col(self.sel < 0),1)
|
||||||
spr(96,15,107,4,2)
|
spr(96,15,107,4,2)
|
||||||
print("full ammo\nfull shield\n+50% health",54, 106, 6)
|
print("full ammo\nfull shield\n+50% health",54, 107, 6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function rearm_mode:update_pos()
|
function rearm_mode:update_pos()
|
||||||
@ -2013,6 +2011,7 @@ function rearm_mode:update_pos()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function rearm_mode:update()
|
function rearm_mode:update()
|
||||||
|
self.crt_frm+=0.25
|
||||||
self:update_pos()
|
self:update_pos()
|
||||||
if self.pos > 1 then
|
if self.pos > 1 then
|
||||||
mode = game_mode
|
mode = game_mode
|
||||||
|
Reference in New Issue
Block a user