Added changes from week 2 videoa

This commit is contained in:
KevinGorman committed 2025-01-19 21:04:07 -05:00
1 parent 90bdd35020
commit 3b09af598b
7 files changed
+156 -29

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://b53r5iysu7d4t"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_qubif"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qxj7e"]
size = Vector2(19, 4)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_qubif")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.5, 0)
shape = SubResource("RectangleShape2D_qxj7e")
debug_color = Color(0.717124, 0, 0.290401, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+15 -26
View File
@@ -1,8 +1,8 @@
[gd_scene load_steps=9 format=3 uid="uid://dhgts0kodsujx"]
[gd_scene load_steps=8 format=3 uid="uid://dhgts0kodsujx"]
[ext_resource type="PackedScene" uid="uid://djkjmi7bo58uv" path="res://scenes/crate.tscn" id="1_6shkr"]
[ext_resource type="Script" path="res://scripts/gameController.gd" id="1_7tjsy"]
[ext_resource type="Script" path="res://scripts/charController.gd" id="2_uc4yi"]
[ext_resource type="PackedScene" uid="uid://b2hyqfqh02ep6" path="res://scenes/player.tscn" id="3_bssht"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="3_t4lk8"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_n7xvc"]
@@ -11,9 +11,6 @@ size = Vector2(92, 20)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_gasd3"]
distance = -484.0
[sub_resource type="CircleShape2D" id="CircleShape2D_uvblg"]
radius = 32.5576
[sub_resource type="CircleShape2D" id="CircleShape2D_5ph8t"]
radius = 62.0
@@ -27,30 +24,13 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="firstPlatform"]
shape = SubResource("RectangleShape2D_n7xvc")
[node name="RigidBody2D" parent="." instance=ExtResource("1_6shkr")]
position = Vector2(605, 106)
rotation = -0.706362
[node name="RigidBody2D2" parent="." instance=ExtResource("1_6shkr")]
position = Vector2(603, 208)
[node name="Floor" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"]
shape = SubResource("WorldBoundaryShape2D_gasd3")
[node name="RigidBody2D4" parent="." instance=ExtResource("1_6shkr")]
position = Vector2(629, 37)
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(524, 393)
script = ExtResource("2_uc4yi")
PUSH_FORCE = 100
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CircleShape2D_uvblg")
debug_color = Color(0.872789, 0.000463018, 0.842707, 0.42)
[node name="CharacterBody2D" parent="." instance=ExtResource("3_bssht")]
position = Vector2(188, 575)
[node name="Area2D" type="Area2D" parent="."]
position = Vector2(952, 434)
@@ -61,8 +41,17 @@ metadata/_edit_group_ = true
shape = SubResource("CircleShape2D_5ph8t")
debug_color = Color(0.630721, 0.529414, 1.92523e-07, 0.42)
[node name="RigidBody2D3" parent="." instance=ExtResource("1_6shkr")]
position = Vector2(534, 53)
[node name="RigidBody2D" parent="." groups=["pushables"] instance=ExtResource("1_6shkr")]
position = Vector2(209, 113)
rotation = 2.09219
[node name="RigidBody2D2" parent="." groups=["pushables"] instance=ExtResource("1_6shkr")]
position = Vector2(595, 192)
rotation = 4.86807
[node name="RigidBody2D3" parent="." groups=["pushables"] instance=ExtResource("1_6shkr")]
position = Vector2(373, 200)
rotation = -0.0982481
[connection signal="areaTrigger" from="Area2D" to="." method="_on_trigger"]
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
+27
View File
@@ -0,0 +1,27 @@
[gd_scene load_steps=3 format=3 uid="uid://b2hyqfqh02ep6"]
[ext_resource type="Script" path="res://scripts/charController.gd" id="1_4o8do"]
[sub_resource type="CircleShape2D" id="CircleShape2D_uvblg"]
radius = 32.5576
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_4o8do")
PUSH_FORCE = 100
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_uvblg")
debug_color = Color(0.872789, 0.000463018, 0.842707, 0.42)
[node name="RightRay" type="RayCast2D" parent="."]
target_position = Vector2(76, 0)
[node name="LeftRay" type="RayCast2D" parent="."]
target_position = Vector2(-76, 0)
[node name="MarkerRight" type="Node2D" parent="."]
position = Vector2(35, -10)
[node name="MarkerLeft" type="Node2D" parent="."]
position = Vector2(-35, -10)