clamp camera to map
This commit is contained in:
parent
63ea78592a
commit
0f6343b44f
5 changed files with 61 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://nfayf78xiuap"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://nfayf78xiuap"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Main.gd" id="1_ysxum"]
|
||||
[ext_resource type="Script" path="res://scripts/ChunkHandler.gd" id="2_6cequ"]
|
||||
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://2we3txfr812u" path="res://scenes/Camera_zoom_2d.tscn" id="4_rx82t"]
|
||||
[ext_resource type="Script" path="res://scripts/EntityPlacer.gd" id="5_8jju5"]
|
||||
[ext_resource type="Script" path="res://scripts/Minimap.gd" id="5_rg28x"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxn2fno1j7vf5" path="res://icon.svg" id="7_w68w7"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_ysxum")
|
||||
|
@ -116,12 +117,14 @@ script = ExtResource("5_rg28x")
|
|||
|
||||
[node name="CameraMarker" type="Sprite2D" parent="UILayer/Control/Minimap"]
|
||||
position = Vector2(-32, 0)
|
||||
texture = ExtResource("7_w68w7")
|
||||
|
||||
[node name="MinimapSprite" type="Sprite2D" parent="UILayer/Control/Minimap"]
|
||||
texture_repeat = 1
|
||||
centered = false
|
||||
|
||||
[connection signal="set_camera_position" from="." to="CameraZoom2D" method="_on_set_camera_position"]
|
||||
[connection signal="worldgen_ready" from="." to="CameraZoom2D" method="_on_main_worldgen_ready"]
|
||||
[connection signal="worldgen_ready" from="." to="ChunkHandler" method="_on_main_worldgen_ready"]
|
||||
[connection signal="worldgen_ready" from="." to="UILayer/Control/Minimap" method="_on_main_worldgen_ready"]
|
||||
[connection signal="pressed" from="UILayer/Control/ConstructionPanel/button_residental" to="UILayer/Control" method="_on_button_residental_pressed"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue