mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-05 05:02:02 +02:00
Make drop areas react to collision with "cursor" scene
This is a preparation to allow drop areas on GUI elements.
This commit is contained in:
parent
f6c7ef90d8
commit
38faac5485
10 changed files with 53 additions and 12 deletions
scenes
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/terminal.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scenes/main.gd" type="Script" id=2]
|
||||
|
@ -8,6 +8,7 @@
|
|||
[ext_resource path="res://styles/theme.tres" type="Theme" id=6]
|
||||
[ext_resource path="res://fonts/big.tres" type="DynamicFont" id=7]
|
||||
[ext_resource path="res://sounds/success.wav" type="AudioStream" id=8]
|
||||
[ext_resource path="res://scenes/cursor.gd" type="Script" id=9]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
content_margin_left = 10.0
|
||||
|
@ -20,6 +21,9 @@ corner_radius_top_right = 3
|
|||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 1.0
|
||||
|
||||
[node name="Main" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
@ -235,6 +239,18 @@ size_flags_vertical = 3
|
|||
[node name="SuccessSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 8 )
|
||||
volume_db = -10.0
|
||||
|
||||
[node name="Cursor" type="Node2D" parent="."]
|
||||
position = Vector2( 68.6342, 59.1206 )
|
||||
script = ExtResource( 9 )
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="Cursor"]
|
||||
input_pickable = false
|
||||
collision_layer = 524288
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Cursor/Area2D"]
|
||||
shape = SubResource( 2 )
|
||||
[connection signal="button_down" from="Rows/Columns/RightSide/LevelInfo/Menu/ChapterSelect" to="." method="repopulate_chapters"]
|
||||
[connection signal="button_down" from="Rows/Columns/RightSide/LevelInfo/Menu/LevelSelect" to="." method="repopulate_levels"]
|
||||
[connection signal="pressed" from="Rows/Columns/RightSide/LevelInfo/Menu/ReloadButton" to="." method="reload_level"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue