Fixed editor, created new islands

master
Martin Felis 2021-07-14 20:11:20 +02:00
parent 4d59a9841d
commit 3ba2fc4c34
15 changed files with 122 additions and 104 deletions

View File

@ -13,7 +13,7 @@ var OceanNavGrid = null
var IslandNavGrid = null
var hex_size = 128
var debug_nav = false
var debug_nav = true
# Called when the node enters the scene tree for the first time.
func _ready():

View File

@ -1 +1 @@
{"(-480, 277.128113)":"Sand","(-480, 387.97937)":"Sand","(-384, -443.404968)":"Sand","(-384, -332.553711)":"Sand","(-384, -221.702499)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Grass","(-288, -277.128113)":"Sand","(-288, 166.276871)":"Sand","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, -554.256226)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Sand","(-96, -498.830597)":"Sand","(-96, -387.97937)":"Grass","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(0, -554.256226)":"Sand","(0, -443.404999)":"Grass","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, -554.256226)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 277.128113)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(480, 55.425629)":"Sand"}
{"(-288, 55.425621)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 554.256226)":"Sand","(-192, 665.107483)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -166.276871)":"Sand","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Sand","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, -277.128113)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Sand","(288, 720.533142)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(480, -55.425613)":"Sand"}

View File

@ -1 +1 @@
{"(-480, -55.425629)":"Sand","(-480, 55.425613)":"Sand","(-480, 166.276855)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Sand","(-192, -332.553741)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Sand","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Sand","(480, 55.425629)":"Sand"}
{"(-480, -55.425629)":"Sand","(-480, 55.425613)":"Sand","(-480, 166.276855)":"Sand","(-480, 498.830627)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Sand","(-384, 554.256226)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Grass","(-96, 498.830627)":"Sand","(0, 110.85125)":"Sand","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, 110.85125)":"Sand","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, 166.276871)":"Sand","(288, 277.128113)":"Grass","(288, 387.97937)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Grass","(384, 332.553711)":"Sand","(480, -55.425613)":"Sand","(480, 55.425629)":"Sand","(480, 166.276886)":"Grass","(480, 277.128113)":"Grass","(480, 387.97937)":"Sand","(576, 0)":"Sand","(576, 110.851257)":"Sand","(576, 221.702484)":"Sand","(576, 332.553741)":"Sand"}

View File

@ -1 +1 @@
{"(-672, 387.97937)":"Sand","(-672, 498.830627)":"Sand","(-576, 221.702484)":"Sand","(-576, 332.553741)":"Sand","(-576, 443.404999)":"Sand","(-480, 166.276855)":"Sand","(-480, 277.128113)":"Sand","(-480, 387.97937)":"Grass","(-480, 498.830627)":"Sand","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Grass","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Sand","(-288, -277.128113)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Sand","(-192, -332.553741)":"Sand","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(0, 443.404999)":"Sand","(0, 554.256226)":"Grass","(0, 665.107483)":"Sand","(0, 775.95874)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Sand","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Grass","(96, 831.384399)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Sand","(192, 110.85125)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Grass","(192, 886.809998)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Sand","(288, 387.97937)":"Sand","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, 443.404968)":"Sand","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, 387.97937)":"Sand","(480, 498.830627)":"Grass","(480, 609.681885)":"Grass","(480, 720.533142)":"Sand","(576, 443.404999)":"Sand","(576, 554.256226)":"Sand","(576, 665.107544)":"Sand"}
{"(-576, 0)":"Sand","(-576, 110.851242)":"Sand","(-480, -166.276886)":"Sand","(-480, -55.425629)":"Sand","(-480, 55.425613)":"Grass","(-480, 166.276855)":"Sand","(-480, 277.128113)":"Sand","(-480, 387.97937)":"Sand","(-384, -221.702499)":"Sand","(-384, -110.851242)":"Grass","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Grass","(-384, 332.553741)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Sand","(0, 0)":"Sand","(0, 110.85125)":"Grass","(0, 221.702499)":"Sand","(96, -55.425625)":"Sand","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Sand","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Sand","(384, 221.702499)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Grass","(480, 55.425629)":"Sand","(576, -332.553741)":"Sand","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand","(576, 0)":"Sand"}

View File

@ -1 +1 @@
{"(-384, 0)":"Sand","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Grass","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(288, 387.97937)":"Sand","(384, -554.256226)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Grass","(384, 221.702499)":"Sand","(384, 332.553711)":"Sand","(480, -498.830627)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Grass","(480, 55.425629)":"Grass","(480, 166.276886)":"Grass","(480, 277.128113)":"Sand","(576, -443.404999)":"Sand","(576, -332.553741)":"Grass","(576, -221.702484)":"Grass","(576, -110.851242)":"Grass","(576, 0)":"Grass","(576, 110.851257)":"Grass","(576, 221.702484)":"Sand","(672, -387.97937)":"Sand","(672, -277.128113)":"Grass","(672, -166.276871)":"Sand","(672, -55.425629)":"Sand","(672, 55.425629)":"Grass","(672, 166.276855)":"Sand","(768, -332.553741)":"Sand","(768, -221.702499)":"Sand","(768, 0)":"Sand","(768, 110.851227)":"Sand"}
{"(-384, 110.85125)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Sand","(-288, 609.681885)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 498.830597)":"Sand","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Sand","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, -332.553741)":"Sand","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Sand","(384, 665.107483)":"Sand","(384, 775.95874)":"Sand","(480, -277.128113)":"Sand","(480, -166.276855)":"Sand","(480, -55.425613)":"Sand","(480, 55.425629)":"Sand","(480, 609.681885)":"Sand","(480, 720.533142)":"Sand","(576, 665.107544)":"Sand"}

View File

@ -1 +1 @@
{"(-480, -387.97937)":"Sand","(-480, -277.128113)":"Sand","(-480, -166.276886)":"Sand","(-384, -443.404968)":"Sand","(-384, -332.553711)":"Grass","(-384, -221.702499)":"Sand","(-384, -110.851242)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Grass","(-288, -277.128113)":"Grass","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Sand","(-288, 720.533081)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Sand","(-192, 443.404999)":"Sand","(-192, 554.256226)":"Sand","(-192, 665.107483)":"Sand","(-192, 775.95874)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Sand","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Grass","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Grass","(-96, 831.384338)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Grass","(0, 886.809998)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Grass","(96, 831.384399)":"Sand","(96, 942.235657)":"Sand","(192, -554.256226)":"Sand","(192, -443.404999)":"Grass","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Grass","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Grass","(192, 886.809998)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Grass","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Sand","(288, 166.276871)":"Sand","(288, 277.128113)":"Sand","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Sand","(384, 332.553711)":"Sand","(384, 443.404968)":"Sand","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, -498.830627)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Sand","(480, 498.830627)":"Sand","(480, 609.681885)":"Grass","(480, 720.533142)":"Sand","(576, -443.404999)":"Sand","(576, -332.553741)":"Grass","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand","(576, 554.256226)":"Sand","(576, 665.107544)":"Sand","(672, -387.97937)":"Sand","(672, -277.128113)":"Sand"}
{"(-384, -221.702499)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Sand","(-288, -277.128113)":"Sand","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Grass","(-192, 0)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Sand","(-96, 498.830627)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Sand","(0, 443.404999)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Sand","(96, 498.830597)":"Grass","(96, 609.681885)":"Sand","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Grass","(192, 554.256226)":"Grass","(192, 665.107483)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Grass","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Grass","(384, 332.553711)":"Grass","(384, 443.404968)":"Grass","(384, 554.256226)":"Grass","(384, 665.107483)":"Sand","(480, 166.276886)":"Sand","(480, 277.128113)":"Sand","(480, 387.97937)":"Grass","(480, 498.830627)":"Grass","(480, 609.681885)":"Sand","(576, 332.553741)":"Sand","(576, 443.404999)":"Sand","(576, 554.256226)":"Sand"}

View File

@ -0,0 +1 @@
{"(-384, 443.404999)":"Sand","(-384, 554.256226)":"Sand","(-384, 665.107483)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 387.97937)":"Sand","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Grass","(-288, 720.533081)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Sand","(-192, 332.553741)":"Sand","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Grass","(-96, 498.830627)":"Grass","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Sand","(192, 0)":"Sand","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Grass","(288, 720.533142)":"Sand","(384, 554.256226)":"Sand","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, 498.830627)":"Sand","(480, 609.681885)":"Sand","(480, 720.533142)":"Sand","(576, 554.256226)":"Sand"}

View File

@ -0,0 +1 @@
{"(-576, 221.702484)":"Sand","(-576, 332.553741)":"Sand","(-576, 443.404999)":"Sand","(-576, 554.256226)":"Sand","(-480, 166.276855)":"Sand","(-480, 277.128113)":"Grass","(-480, 387.97937)":"Grass","(-480, 498.830627)":"Grass","(-480, 609.681885)":"Sand","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Grass","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Grass","(-384, 665.107483)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Sand","(-192, -332.553741)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Grass","(-96, 498.830627)":"Grass","(-96, 609.681824)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Sand","(0, 110.85125)":"Sand","(0, 221.702499)":"Sand","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Sand","(96, 498.830597)":"Sand","(96, 609.681885)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Sand","(192, 332.553741)":"Sand","(192, 554.256226)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Sand","(480, -166.276855)":"Grass","(480, -55.425613)":"Sand","(480, 55.425629)":"Sand","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand"}

View File

@ -0,0 +1 @@
{"(-672, -166.276855)":"Sand","(-672, -55.425629)":"Sand","(-672, 55.425629)":"Sand","(-672, 166.276871)":"Sand","(-576, -332.553741)":"Sand","(-576, -221.702484)":"Sand","(-576, -110.851257)":"Grass","(-576, 0)":"Grass","(-576, 110.851242)":"Grass","(-576, 221.702484)":"Sand","(-480, -387.97937)":"Sand","(-480, -277.128113)":"Grass","(-480, -166.276886)":"Grass","(-480, -55.425629)":"Grass","(-480, 55.425613)":"Grass","(-480, 166.276855)":"Grass","(-480, 277.128113)":"Sand","(-384, -332.553711)":"Sand","(-384, -221.702499)":"Grass","(-384, -110.851242)":"Grass","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-384, 554.256226)":"Sand","(-384, 665.107483)":"Sand","(-384, 775.95874)":"Sand","(-288, -387.97937)":"Sand","(-288, -277.128113)":"Grass","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Sand","(-288, 387.97937)":"Sand","(-288, 498.830627)":"Sand","(-288, 609.681885)":"Grass","(-288, 720.533081)":"Grass","(-288, 831.384338)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Sand","(-192, 443.404999)":"Sand","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Grass","(-192, 775.95874)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Sand","(0, 110.85125)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Sand","(0, 775.95874)":"Sand","(96, -166.276871)":"Sand","(96, -55.425625)":"Sand"}

View File

@ -0,0 +1 @@
{"(-864, 387.97937)":"Sand","(-864, 498.830627)":"Sand","(-768, 221.702499)":"Sand","(-768, 332.553741)":"Sand","(-768, 443.404999)":"Grass","(-768, 554.256226)":"Sand","(-768, 665.107483)":"Sand","(-672, 166.276871)":"Sand","(-672, 277.128113)":"Grass","(-672, 387.97937)":"Grass","(-672, 498.830627)":"Grass","(-672, 609.681885)":"Grass","(-672, 720.533081)":"Sand","(-576, 221.702484)":"Sand","(-576, 332.553741)":"Grass","(-576, 443.404999)":"Grass","(-576, 554.256226)":"Grass","(-576, 665.107483)":"Sand","(-480, -387.97937)":"Sand","(-480, 277.128113)":"Sand","(-480, 387.97937)":"Grass","(-480, 498.830627)":"Grass","(-480, 609.681885)":"Sand","(-384, -443.404968)":"Sand","(-384, -332.553711)":"Sand","(-384, -221.702499)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Grass","(-384, 665.107483)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Grass","(-288, -277.128113)":"Grass","(-288, -166.276871)":"Sand","(-288, 166.276871)":"Sand","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Sand","(-96, -498.830597)":"Sand","(-96, -387.97937)":"Grass","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 166.276871)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Sand","(192, 0)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Sand","(288, -166.276871)":"Sand"}

View File

@ -0,0 +1 @@
{"(-864, 166.276886)":"Sand","(-864, 277.128113)":"Sand","(-864, 387.97937)":"Sand","(-768, 110.851257)":"Sand","(-768, 221.702499)":"Grass","(-768, 332.553741)":"Grass","(-768, 443.404999)":"Sand","(-672, 55.425629)":"Sand","(-672, 166.276871)":"Grass","(-672, 277.128113)":"Grass","(-672, 387.97937)":"Grass","(-672, 498.830627)":"Sand","(-672, 609.681885)":"Sand","(-672, 720.533081)":"Sand","(-576, -110.851257)":"Sand","(-576, 0)":"Sand","(-576, 110.851242)":"Sand","(-576, 221.702484)":"Grass","(-576, 332.553741)":"Grass","(-576, 443.404999)":"Grass","(-576, 554.256226)":"Grass","(-576, 665.107483)":"Grass","(-576, 775.95874)":"Sand","(-576, 886.809937)":"Sand","(-480, -277.128113)":"Sand","(-480, -166.276886)":"Sand","(-480, -55.425629)":"Grass","(-480, 55.425613)":"Grass","(-480, 166.276855)":"Grass","(-480, 277.128113)":"Grass","(-480, 387.97937)":"Grass","(-480, 498.830627)":"Grass","(-480, 609.681885)":"Grass","(-480, 720.533081)":"Grass","(-480, 831.384338)":"Sand","(-384, -332.553711)":"Sand","(-384, -221.702499)":"Grass","(-384, -110.851242)":"Grass","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Grass","(-384, 665.107483)":"Grass","(-384, 775.95874)":"Sand","(-288, -387.97937)":"Sand","(-288, -277.128113)":"Grass","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Sand","(-288, 387.97937)":"Sand","(-288, 498.830627)":"Sand","(-288, 609.681885)":"Sand","(-288, 720.533081)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Sand","(-96, -498.830597)":"Sand","(-96, -387.97937)":"Grass","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Sand","(192, 0)":"Sand","(192, 110.85125)":"Sand"}

View File

@ -10,7 +10,6 @@ config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]

View File

@ -16,14 +16,17 @@ onready var world = get_node("../World")
onready var world_camera = get_node("../World/Camera")
var last_index = -1
var Island = preload("Island.gd")
var island = null
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
island = Island.new()
island.load_island("res://islands/pirate_game_island_0.island")
add_child(island)
func handle_editor_event(event):
var island = world.current_island
if (Input.get_mouse_button_mask() & BUTTON_LEFT) == BUTTON_LEFT:
# if event.pressed and event.button_index == BUTTON_LEFT:
var pressed_button = NoneButton.group.get_pressed_button()
@ -39,17 +42,27 @@ func handle_editor_event(event):
return false
func _process(_delta):
world.Islands.visible = !EditorUI.visible
island.visible = EditorUI.visible
func is_active():
return EditorUI.visible
func _unhandled_input(event):
if not EditorUI.visible:
return
if event is InputEventMouseButton:
if handle_editor_event (event):
return
get_tree().set_input_as_handled()
update()
if 'position' in event:
if handle_editor_event (event):
return
get_tree().set_input_as_handled()
update()
@ -63,17 +76,14 @@ func get_island_filename():
func _on_SaveWorldButton_pressed():
var island = world.current_island
island.save_island(get_island_filename())
func _on_ClearWorldButton_pressed():
var island = world.current_island
island.clear_island()
func _on_LoadWorldButton_pressed():
var island = world.current_island
island.load_island(get_island_filename())
last_index = IslandIndex.value
@ -84,9 +94,7 @@ func _on_EditIslandButton_toggled(button_pressed):
func _on_IslandIndex_value_changed(_value):
var island = world.current_island
if last_index >= 0:
island.save_island(get_island_filename_for_index(last_index))
island.clear_island()
island.load_island(get_island_filename())

View File

@ -22,6 +22,90 @@ resource_name = "TileTypeGroup"
[node name="GameRoot" type="Node"]
[node name="Editor" type="Node2D" parent="."]
script = ExtResource( 7 )
[node name="UI" type="CanvasLayer" parent="Editor"]
[node name="Editor" type="VBoxContainer" parent="Editor/UI"]
visible = false
margin_left = 12.0
margin_top = 53.0
margin_right = 94.0
margin_bottom = 600.0
theme = SubResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Island" type="Label" parent="Editor/UI/Editor"]
margin_right = 110.0
margin_bottom = 33.0
text = "Island"
[node name="IslandIndex" type="SpinBox" parent="Editor/UI/Editor"]
margin_top = 37.0
margin_right = 110.0
margin_bottom = 80.0
max_value = 9.0
[node name="ClearWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 84.0
margin_right = 110.0
margin_bottom = 123.0
text = "Clear"
[node name="LoadWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 127.0
margin_right = 110.0
margin_bottom = 166.0
text = "Load"
[node name="SaveWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 170.0
margin_right = 110.0
margin_bottom = 209.0
text = "Save"
[node name="Label" type="Label" parent="Editor/UI/Editor"]
margin_top = 213.0
margin_right = 110.0
margin_bottom = 246.0
text = "Tiles"
[node name="NoneButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 250.0
margin_right = 110.0
margin_bottom = 289.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "None"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SandButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 293.0
margin_right = 110.0
margin_bottom = 332.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Sand"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GrassButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 336.0
margin_right = 110.0
margin_bottom = 375.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Grass"
[node name="World" type="Node2D" parent="."]
script = ExtResource( 1 )
@ -171,92 +255,9 @@ current = true
scale = Vector2( 0.455, 0.455 )
texture = ExtResource( 9 )
[node name="Editor" type="Node2D" parent="."]
script = ExtResource( 7 )
[node name="UI" type="CanvasLayer" parent="Editor"]
[node name="Editor" type="VBoxContainer" parent="Editor/UI"]
visible = false
margin_left = 12.0
margin_top = 53.0
margin_right = 94.0
margin_bottom = 600.0
theme = SubResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Island" type="Label" parent="Editor/UI/Editor"]
margin_right = 110.0
margin_bottom = 33.0
text = "Island"
[node name="IslandIndex" type="SpinBox" parent="Editor/UI/Editor"]
margin_top = 37.0
margin_right = 110.0
margin_bottom = 80.0
max_value = 9.0
[node name="ClearWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 84.0
margin_right = 110.0
margin_bottom = 123.0
text = "Clear"
[node name="LoadWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 127.0
margin_right = 110.0
margin_bottom = 166.0
text = "Load"
[node name="SaveWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 170.0
margin_right = 110.0
margin_bottom = 209.0
text = "Save"
[node name="Label" type="Label" parent="Editor/UI/Editor"]
margin_top = 213.0
margin_right = 110.0
margin_bottom = 246.0
text = "Tiles"
[node name="NoneButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 250.0
margin_right = 110.0
margin_bottom = 289.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "None"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SandButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 293.0
margin_right = 110.0
margin_bottom = 332.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Sand"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GrassButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 336.0
margin_right = 110.0
margin_bottom = 375.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Grass"
[connection signal="toggled" from="World/UI/TopContainer/EditIslandButton" to="Editor" method="_on_EditIslandButton_toggled"]
[connection signal="pressed" from="World/UI/TopContainer/Button" to="World" method="_on_generate_button_pressed"]
[connection signal="value_changed" from="Editor/UI/Editor/IslandIndex" to="Editor" method="_on_IslandIndex_value_changed"]
[connection signal="pressed" from="Editor/UI/Editor/ClearWorldButton" to="Editor" method="_on_ClearWorldButton_pressed"]
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
[connection signal="toggled" from="World/UI/TopContainer/EditIslandButton" to="Editor" method="_on_EditIslandButton_toggled"]
[connection signal="pressed" from="World/UI/TopContainer/Button" to="World" method="_on_generate_button_pressed"]

View File

@ -3,6 +3,7 @@ extends Node2D
onready var Grid = get_node("Grid")
onready var GridHighlight = get_node("GridHighlight")
onready var Editor = get_node("../Editor")
onready var Islands = get_node("Islands")
onready var EditIslandButton = get_node("UI/TopContainer/EditIslandButton")
@ -48,6 +49,7 @@ func _ready():
func _process(_delta):
if Editor == null or not Editor.is_active():
WorldCamera.offset = PlayerChar.position
if len(player_navigation_path) > 1:
@ -140,7 +142,7 @@ func generate():
for i in range (num_islands):
var island = Island.new()
var island_index = i % 5
var island_index = i % 10
var file_name = "res://islands/pirate_game_island_" + str(island_index) + ".island"
island.load_island(file_name)
@ -346,6 +348,9 @@ func _on_generate_button_pressed():
func handle_game_event(event):
if Editor and Editor.is_active():
return false
if event is InputEventMouseButton:
# Move main character
if event.pressed and event.button_index == BUTTON_LEFT: