- Ja es pot triar tile a l'editor
This commit is contained in:
@@ -42,6 +42,30 @@ editor={
|
|||||||
editor.paused=true
|
editor.paused=true
|
||||||
editor.show_menu()
|
editor.show_menu()
|
||||||
end
|
end
|
||||||
|
if btnp(KEY_TAB) then
|
||||||
|
update=editor.update_tileset
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
update_tileset=function()
|
||||||
|
cls()
|
||||||
|
sspr(0,0,128,128,0,0)
|
||||||
|
|
||||||
|
local mx,my=mousex(),mousey()
|
||||||
|
local tx,ty=mx>>3,my>>3
|
||||||
|
local rx,ry=tx<<3,ty<<3
|
||||||
|
rect(rx-1, ry-1, rx+8, ry+8, 10)
|
||||||
|
|
||||||
|
if btnp(KEY_TAB) or btnp(KEY_ESCAPE) then
|
||||||
|
update=editor.update
|
||||||
|
end
|
||||||
|
|
||||||
|
if mbtnp(1) then
|
||||||
|
if tx<16 and ty<16 then
|
||||||
|
editor.selected_tile=ty*16+tx
|
||||||
|
end
|
||||||
|
update=editor.update
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user