[NEW] Batvió
[NEW] tiles2.gif
This commit is contained in:
53
data/batvio.lua
Normal file
53
data/batvio.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
-- 0,80 -> 112,112
|
||||
batvio={
|
||||
name="batvio",
|
||||
hab=7,
|
||||
x=7,
|
||||
y=2,
|
||||
w=112,
|
||||
h=32,
|
||||
flip=true,
|
||||
frame=0,
|
||||
wait=0,
|
||||
step=0,
|
||||
energy=_energy,
|
||||
max_energy = _energy,
|
||||
hit=zombie.hit,
|
||||
update=zombie.update_normal,
|
||||
draw=zombie.draw,
|
||||
jumpfwd=false,
|
||||
anim={},
|
||||
bb={x=16,y=3,w=80,h=29},
|
||||
can_warp=false,
|
||||
warping=false,
|
||||
shrink=1,
|
||||
d_shrink=1,
|
||||
angle=0,
|
||||
d_angle=15,
|
||||
dying=false,
|
||||
death_time=40,
|
||||
enabled=true,
|
||||
disable_reason="",
|
||||
enabled=true,
|
||||
}
|
||||
|
||||
function batvio.init()
|
||||
local world_x, world_y = coords.room_to_world(batvio.hab,batvio.x,batvio.y)
|
||||
batvio.x=world_x
|
||||
batvio.y=world_y
|
||||
end
|
||||
|
||||
function batvio.draw()
|
||||
local curr_sf = surf.source()
|
||||
surf.source(tiles2)
|
||||
local scr_x, scr_y = viewp:screen_coords( batvio.x, batvio.y )
|
||||
draw.surf(0,80,batvio.w,batvio.h,scr_x,scr_y,batvio.w,batvio.h,batvio.flip)
|
||||
surf.source(curr_sf)
|
||||
end
|
||||
|
||||
function batvio.hit()
|
||||
end
|
||||
|
||||
function batvio.update()
|
||||
|
||||
end
|
||||
@@ -65,6 +65,8 @@ function bol.update()
|
||||
start_scene(scenes.bol_trobat)
|
||||
bol.scene_trobat = true
|
||||
-- remove_actor(bol)
|
||||
-- crear el trigger per a disparar el final de fase
|
||||
table.insert( actors, trigger.new(8,4,3,triggers.escena_stage1_ending,"stage1 ending","TR09") )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,6 +26,7 @@ require "trigger_event"
|
||||
require "batman"
|
||||
require "health_potion"
|
||||
require "tiles_layer2"
|
||||
require "batvio"
|
||||
|
||||
local DEBUG = false
|
||||
|
||||
@@ -287,9 +288,9 @@ function update_game()
|
||||
|
||||
score.draw()
|
||||
|
||||
if DEBUG then
|
||||
special_keys()
|
||||
debug_info()
|
||||
if DEBUG then
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ function images_init()
|
||||
surf.source(tiles)
|
||||
local paleta=pal.load("tiles.gif")
|
||||
pal.set(paleta)
|
||||
|
||||
tiles2=surf.load("tiles2.gif")
|
||||
-- Crear el warp
|
||||
warp.init(tiles)
|
||||
end
|
||||
|
||||
@@ -49,7 +49,7 @@ function pattern:noop()
|
||||
end
|
||||
|
||||
function pattern:draw()
|
||||
if true then return end
|
||||
-- if true then return end
|
||||
local scr_x = 0
|
||||
local scr_y = 0
|
||||
local target = self:target()
|
||||
|
||||
@@ -27,6 +27,9 @@ function stages.stage1_init()
|
||||
elalien.init()
|
||||
table.insert(actors,elalien)
|
||||
|
||||
batvio.init()
|
||||
table.insert(actors,batvio)
|
||||
|
||||
boss = imp.new(55,4,3)
|
||||
table.insert( actors, boss )
|
||||
boss_meter = bar_meter.new(20,12,128,10,1,1,boss,5)
|
||||
@@ -164,7 +167,7 @@ function stages.stage1_init()
|
||||
|
||||
local abad_x, abad_y = coords.room_to_world ( 10, 4, 3 )
|
||||
-- local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 )
|
||||
-- local abad_x, abad_y = coords.room_to_world ( 18, 9, 3 )
|
||||
local abad_x, abad_y = coords.room_to_world ( 18, 9, 3 )
|
||||
|
||||
abad:move(abad_x, abad_y)
|
||||
abad_make_safe( true )
|
||||
|
||||
BIN
data/tiles2.gif
Normal file
BIN
data/tiles2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -124,8 +124,8 @@ function triggers:escena_abad_porta_batman()
|
||||
end
|
||||
|
||||
function triggers:escena_habitacio_batman()
|
||||
if abad.objects.clau_premiere~=nil and
|
||||
abad.objects.clau_elalien~=nil
|
||||
if abad.objects.clau_premiere==nil and
|
||||
abad.objects.clau_elalien==nil
|
||||
then
|
||||
-- switches.start(0,0)
|
||||
local trigger_porta = trigger.new(abad.hab,1,1,triggers.open_door,"switch","porta acces cacaus","",{20, 53,41})
|
||||
@@ -142,6 +142,11 @@ function triggers:escena_habitacio_batman()
|
||||
end
|
||||
end
|
||||
|
||||
function triggers:escena_stage1_ending()
|
||||
print("STAGE 1 ENDING")
|
||||
remove_actor(self)
|
||||
end
|
||||
|
||||
function triggers:escena_lluita_imp()
|
||||
set_actors_enabled_by_room(false, "boss", stage1_boss_mapa.r0.r, stage1_boss_mapa.r1.r)
|
||||
viewp:fixed({l=8,r=44,u=0,d=0}, viewp.x, viewp.y-48)
|
||||
|
||||
Reference in New Issue
Block a user