- [NEW] Redimensionades les habitacions per a ocupar tota la pantalla
- [FIX] Ajustada posició inici segons nou tamany de habitacions - [FIX] Ajustat nivell de l'aigua segons nou tamany de habitacions - [WIP] Treballant en el nou menú
This commit is contained in:
@@ -23,6 +23,7 @@ editor = {
|
||||
end,
|
||||
|
||||
update = function()
|
||||
tweening.update(sys.delta())
|
||||
if sys.beat() then
|
||||
editor.ants = (editor.ants<<12) | (editor.ants>>4)
|
||||
end
|
||||
@@ -38,10 +39,6 @@ editor = {
|
||||
end
|
||||
end
|
||||
|
||||
-- Pintar el menú (el marcador serà en el modul game.lua)
|
||||
--score.draw()
|
||||
menu.draw()
|
||||
|
||||
-- Pintar el mapa i sprites
|
||||
rooms.draw()
|
||||
|
||||
@@ -50,7 +47,7 @@ editor = {
|
||||
local tx, ty = (mx>>3), (my>>3)
|
||||
mx, my = tx<<3, ty<<3
|
||||
|
||||
if my>=0 then
|
||||
if menu.hidden then
|
||||
if editor.layer==LAYER_BACKGROUND or editor.layer==LAYER_FOREGROUND then
|
||||
if editor.selection then
|
||||
local rx1,ry1,rx2,ry2=editor.selection.x1<<3,editor.selection.y1<<3,editor.selection.x2<<3,editor.selection.y2<<3
|
||||
@@ -132,10 +129,11 @@ editor = {
|
||||
|
||||
view.origin(0,0)
|
||||
draw.text(rooms.pos.x//20,1,96,28)
|
||||
draw.text(rooms.pos.y//12,5,96,28)
|
||||
draw.text(rooms.pos.y//13,5,96,28)
|
||||
|
||||
if key.press(key.ESCAPE) then
|
||||
editor.quit()
|
||||
--editor.quit()
|
||||
menu.toggle()
|
||||
elseif key.press(key.RIGHT) and rooms.pos.x < 20*7 then
|
||||
rooms.pos.x = rooms.pos.x + 20
|
||||
sprites.remove_out_of_room()
|
||||
@@ -144,12 +142,12 @@ editor = {
|
||||
rooms.pos.x = rooms.pos.x - 20
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.DOWN) and rooms.pos.y < 12*7 then
|
||||
rooms.pos.y = rooms.pos.y + 12
|
||||
elseif key.press(key.DOWN) and rooms.pos.y < 13*7 then
|
||||
rooms.pos.y = rooms.pos.y + 13
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.UP) and rooms.pos.y > 0 then
|
||||
rooms.pos.y = rooms.pos.y - 12
|
||||
rooms.pos.y = rooms.pos.y - 13
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.TAB) or key.press(key.ESCAPE) then
|
||||
@@ -188,6 +186,11 @@ editor = {
|
||||
sprites.remove(sprite)
|
||||
end
|
||||
end
|
||||
|
||||
-- Pintar el menú (el marcador serà en el modul game.lua)
|
||||
--score.draw()
|
||||
menu.draw()
|
||||
|
||||
end,
|
||||
|
||||
create_stamp=function()
|
||||
@@ -224,7 +227,7 @@ editor = {
|
||||
for y=1,h do
|
||||
for x=1,w do
|
||||
local fx, fy = tx+x-1, ty+y-1
|
||||
if fx < rooms.pos.x+20 and fy < rooms.pos.y+12 then
|
||||
if fx < rooms.pos.x+20 and fy < rooms.pos.y+13 then
|
||||
map.tile(fx,fy,editor.brush.tiles[p])
|
||||
end
|
||||
p=p+1
|
||||
|
||||
Reference in New Issue
Block a user