minimap: move camera with mouse, show camera pos on map
This commit is contained in:
parent
0f6343b44f
commit
14aa4f0e9a
6 changed files with 68 additions and 23 deletions
|
@ -1,20 +1,20 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://d373de88jug8x"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_ncuso"]
|
||||
noise_type = 3
|
||||
noise_type = 0
|
||||
seed = 35
|
||||
frequency = 0.008
|
||||
fractal_octaves = 3
|
||||
fractal_lacunarity = 1.0
|
||||
fractal_gain = 1.746
|
||||
fractal_octaves = 7
|
||||
fractal_lacunarity = 1.671
|
||||
fractal_gain = 0.947
|
||||
fractal_ping_pong_strength = 25.0
|
||||
domain_warp_fractal_type = 2
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_l3pkr"]
|
||||
width = 1024
|
||||
height = 1024
|
||||
width = 256
|
||||
height = 256
|
||||
noise = SubResource("FastNoiseLite_ncuso")
|
||||
|
||||
[node name="BiomeNoise" type="Sprite2D"]
|
||||
position = Vector2(528, 520)
|
||||
position = Vector2(604, 592)
|
||||
scale = Vector2(1.59375, 1.5625)
|
||||
texture = SubResource("NoiseTexture2D_l3pkr")
|
||||
|
|
|
@ -39,7 +39,7 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
script = ExtResource("3_1t1c8")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
|
@ -111,11 +111,15 @@ anchor_left = 1.0
|
|||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -512.0
|
||||
offset_top = -512.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
mouse_filter = 1
|
||||
script = ExtResource("5_rg28x")
|
||||
|
||||
[node name="CameraMarker" type="Sprite2D" parent="UILayer/Control/Minimap"]
|
||||
z_index = 1
|
||||
position = Vector2(-32, 0)
|
||||
texture = ExtResource("7_w68w7")
|
||||
|
||||
|
@ -134,3 +138,6 @@ centered = false
|
|||
[connection signal="pressed" from="UILayer/Control/ConstructionPanel/button_demolish" to="UILayer/Control" method="_on_button_demolish_pressed"]
|
||||
[connection signal="pressed" from="UILayer/Control/ConstructionPanel/button_services" to="UILayer/Control" method="_on_button_services_pressed"]
|
||||
[connection signal="pressed" from="UILayer/Control/ConstructionPanel/button_social" to="UILayer/Control" method="_on_button_social_pressed"]
|
||||
[connection signal="mouse_entered" from="UILayer/Control/Minimap" to="UILayer/Control/Minimap" method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="UILayer/Control/Minimap" to="UILayer/Control/Minimap" method="_on_mouse_exited"]
|
||||
[connection signal="set_camera_position" from="UILayer/Control/Minimap" to="CameraZoom2D" method="_on_set_camera_position"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue