separate func for tile placement error checking

This commit is contained in:
Antti Hakkarainen 2023-02-08 22:29:12 +02:00
parent c440e5f482
commit 9f2dbb2a1d
8 changed files with 87 additions and 70 deletions

View file

@ -1,4 +1,4 @@
extends Node2D
extends TileMap
func _process(delta):
func _process(_delta):
position = get_viewport().get_mouse_position()

View file

@ -1,8 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://sqvd1ev6ubp"]
[gd_scene load_steps=2 format=3 uid="uid://sqvd1ev6ubp"]
[ext_resource type="Script" path="res://scenes/Building.gd" id="1_uqlnt"]
[ext_resource type="Texture2D" uid="uid://dabmo11wkiwm3" path="res://art/buildings/building_grid.png" id="1_yd1tr"]
[node name="Building" type="Sprite2D"]
texture = ExtResource("1_yd1tr")
script = ExtResource("1_uqlnt")

View file

@ -549,10 +549,11 @@ offset_bottom = 8.0
[node name="DebugInfo" type="Label" parent="UILayer/Control"]
layout_mode = 0
offset_left = 568.0
offset_top = 24.0
offset_right = 928.0
offset_bottom = 280.0
offset_left = 648.0
offset_top = 16.0
offset_right = 936.0
offset_bottom = 256.0
horizontal_alignment = 2
[connection signal="set_camera_position" from="World" to="World/CameraZoom2D" method="_on_world_set_camera_position"]
[connection signal="button_pressed" from="UILayer/Control" to="World" method="_on_control_button_pressed"]