forked from JailDoctor/cacaus
- Peu de Paco implemented
- GPS implemented - Object system working - minor changes to batman and gorro
This commit is contained in:
33
main.lua
33
main.lua
@@ -7,8 +7,8 @@ seltile = 0
|
||||
|
||||
actors={}
|
||||
cameras={}
|
||||
camera_names={"Premiere","EL_ALIEN","BatMan"}
|
||||
current_camera=1
|
||||
camera_names={[0]="GPS","Gorro","Peu de Paco","Premiere","EL_ALIEN","BatMan"}
|
||||
current_camera=0
|
||||
|
||||
function remove_actor(actor)
|
||||
for index, value in pairs(actors) do
|
||||
@@ -28,9 +28,15 @@ function _init()
|
||||
abad_init()
|
||||
table.insert(actors,abad)
|
||||
|
||||
gps.init()
|
||||
table.insert(actors,gps)
|
||||
|
||||
gorro.init()
|
||||
table.insert(actors,gorro)
|
||||
|
||||
peu.init()
|
||||
table.insert(actors,peu)
|
||||
|
||||
premiere.init()
|
||||
table.insert(actors,premiere)
|
||||
|
||||
@@ -49,6 +55,9 @@ function _init()
|
||||
table.insert(actors,starter.new(11,16,32,scenes.abad_corfes))
|
||||
score.create()
|
||||
|
||||
cameras[0]=gps
|
||||
table.insert(cameras,gorro)
|
||||
table.insert(cameras,peu)
|
||||
table.insert(cameras,premiere)
|
||||
table.insert(cameras,elalien)
|
||||
table.insert(cameras,batman)
|
||||
@@ -193,14 +202,20 @@ function update_game()
|
||||
if btnp(KEY_RETURN) then
|
||||
mode=modes.editing
|
||||
mapa_restore_backup()
|
||||
elseif btnp(KEY_1) then
|
||||
current_camera=1
|
||||
elseif btnp(KEY_2) then
|
||||
current_camera=2
|
||||
elseif btnp(KEY_3) then
|
||||
current_camera=3
|
||||
end
|
||||
|
||||
if abad.objects.gps~=nil then
|
||||
if btnp(KEY_1) then
|
||||
if abad.objects.gorro==nil then current_camera=1 end
|
||||
elseif btnp(KEY_2) then
|
||||
if abad.objects.peu==nil then current_camera=2 end
|
||||
elseif btnp(KEY_3) then
|
||||
current_camera=3
|
||||
elseif btnp(KEY_4) then
|
||||
current_camera=4
|
||||
elseif btnp(KEY_5) then
|
||||
current_camera=5
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user