big four object, 3 tiers, custom signal, gamecontroller
This commit is contained in:
commit
2b2d2f08e5
14 files changed
+208
No files matched your search
@@ -0,0 +1,64 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://coiqh7p31ukig"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bblqtronap0j4" path="res://scripts/gamecontroller.gd" id="1_lnu2h"]
|
||||
[ext_resource type="Script" uid="uid://b7rahgxxw1yuw" path="res://scripts/player.gd" id="1_uwrxv"]
|
||||
[ext_resource type="PackedScene" uid="uid://csotsc2cycyia" path="res://scenes/trigger.tscn" id="2_yqjtg"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8cj0n"]
|
||||
size = Vector2(44, 20)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uwrxv"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_8cj0n"]
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
script = ExtResource("1_lnu2h")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(567, 402)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(593, 331)
|
||||
rotation = -0.349066
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.817443, 0.400008, 0.177458, 0.42)
|
||||
|
||||
[node name="RigidBody2D2" type="RigidBody2D" parent="."]
|
||||
position = Vector2(575, 221)
|
||||
rotation = -0.301036
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D2"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.817443, 0.400008, 0.177458, 0.42)
|
||||
|
||||
[node name="ground" type="StaticBody2D" parent="."]
|
||||
position = Vector2(551, 565)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ground"]
|
||||
shape = SubResource("WorldBoundaryShape2D_8cj0n")
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(567, 380)
|
||||
script = ExtResource("1_uwrxv")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("CircleShape2D_8cj0n")
|
||||
debug_color = Color(0.172558, 0.632665, 0.34599, 0.42)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("2_yqjtg")]
|
||||
position = Vector2(601, 428)
|
||||
scale = Vector2(1.36, 1.12)
|
||||
|
||||
[connection signal="areaTriggerSignal" from="Area2D" to="." method="_on_trigger"]
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://csotsc2cycyia"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ditcg54u4c1lr" path="res://scripts/trigger.gd" id="1_du5ex"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
||||
|
||||
[node name="trigger" type="Area2D"]
|
||||
scale = Vector2(1.36, 1.12)
|
||||
script = ExtResource("1_du5ex")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_uwrxv")
|
||||
debug_color = Color(0.599313, 0.407655, 0.917879, 0.42)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
Reference in new issue
Block a user