[WIP] Lluita contra jefes. Càrrega de fase redefinida
This commit is contained in:
@@ -34,10 +34,13 @@ function gota.new(_hab,_x,_y,_freq,_x_offset, _y_offset)
|
||||
update=gota.update_normal,
|
||||
draw=gota.draw_normal,
|
||||
draw_drop= gota.draw_drop,
|
||||
bb={x=4,y=0,w=8,h=12}}
|
||||
bb={x=4,y=0,w=8,h=12},
|
||||
enabled= true,
|
||||
disable_reason="" }
|
||||
end
|
||||
|
||||
function gota:draw_normal()
|
||||
if not self.enabled then return end
|
||||
local x = gota_gif_col*cw
|
||||
local y = gota_gif_row*ch
|
||||
local scr_x, scr_y = viewp:screen_coords( self.x, self.y )
|
||||
@@ -48,6 +51,7 @@ function gota:draw_normal()
|
||||
end
|
||||
|
||||
function gota:update_normal()
|
||||
if not self.enabled then return end
|
||||
self.wait=self.wait+1
|
||||
|
||||
if self.wait==18 then
|
||||
@@ -104,6 +108,7 @@ function gota:hit()
|
||||
end
|
||||
|
||||
function gota:draw_falling()
|
||||
if not self.enabled then return end
|
||||
local gota_x, gota_y = viewp:screen_coords( self.x, self.y )
|
||||
draw.circf( gota_x+4, gota_y+12, 4, 16)
|
||||
draw.circf( gota_x+5, gota_y+13, 3, 11)
|
||||
@@ -111,12 +116,14 @@ function gota:draw_falling()
|
||||
end
|
||||
|
||||
function gota:draw_drop( x, y )
|
||||
if not self.enabled then return end
|
||||
splash_x, splash_y = viewp:screen_coords( x, y )
|
||||
draw.circf( splash_x, splash_y, 2, 16)
|
||||
draw.circf( splash_x, splash_y, 1, 11)
|
||||
end
|
||||
|
||||
function gota:draw_splash()
|
||||
if not self.enabled then return end
|
||||
local splash_L1_x = (self.cx-self.dx)
|
||||
local splash_L2_x = (self.cx-(self.dx/2))
|
||||
local splash_R1_x = (self.cx+self.dx)
|
||||
@@ -131,6 +138,7 @@ function gota:draw_splash()
|
||||
end
|
||||
|
||||
function gota:update_splash()
|
||||
if not self.enabled then return end
|
||||
self.dx=self.dx-1
|
||||
self.dy=self.dy+0.25
|
||||
self.x=self.cx+self.dx
|
||||
|
||||
Reference in New Issue
Block a user