4d13ed4eb0
[NEW] Indicacions per a anar a la mansió de Batman al obrir totes les portes
45 lines
1.1 KiB
Lua
45 lines
1.1 KiB
Lua
sign={}
|
|
|
|
function sign.new(_hab, _x, _y, _angle,_flip)
|
|
local world_x, world_y = coords.room_to_world(_hab,_x,_y)
|
|
return {name="sign",
|
|
hab=_hab,
|
|
x=world_x,
|
|
y=world_y,
|
|
w=16,
|
|
h=16,
|
|
flip=_flip,
|
|
--frame=19,
|
|
wait=0,
|
|
step=0,
|
|
can_warp=false,
|
|
warping=false,
|
|
shrink=1,
|
|
d_shrink=1,
|
|
angle=_angle,
|
|
d_angle=0,
|
|
--hit=sign.hit,
|
|
update=sign.update,
|
|
draw=sign.draw,
|
|
--jumpfwd=false,
|
|
--dying=false,
|
|
--death_time=40,
|
|
--anim={19,19,20,21},
|
|
bb={x=0,y=0,w=16,h=16},
|
|
enabled= true,
|
|
disable_reason="" }
|
|
end
|
|
|
|
function sign:draw()
|
|
if not self.enabled then return end
|
|
local scr_x, scr_y = viewp:screen_coords( self.x, self.y )
|
|
draw.surf(240,224,self.w,self.h,scr_x,scr_y,self.w,self.h,self.flip)
|
|
end
|
|
|
|
function sign:update()
|
|
self.wait = (self.wait + 1) % 18
|
|
if (self.wait==0) then
|
|
self.enabled = not self.enabled
|
|
end
|
|
end
|