shove attack raycast, input maps, bullets object pooling, dynamic instantiation, grenades
This commit is contained in:
1 parent
20f76abae2
commit
426b0aa785
12 files changed
+250
-16
No files matched your search
@@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://daa6idpu4gkat"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cbp3pm7i587mv" path="res://scripts/bullet.gd" id="1_mkf8s"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h1aey"]
|
||||
size = Vector2(4, 2)
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
scale = Vector2(3.2338707, 2.7645516)
|
||||
script = ExtResource("1_mkf8s")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_h1aey")
|
||||
debug_color = Color(0.78294253, 0.1467745, 0.21462014, 0.41960785)
|
||||
+12
-3
@@ -1,7 +1,9 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cy1i6ucex6m0d"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cy1i6ucex6m0d"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c546prectbgc7" path="res://scripts/gamecontroller.gd" id="1_lbhrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://qv8blu8wkqvq" path="res://scenes/crate.tscn" id="1_uwrxv"]
|
||||
[ext_resource type="PackedScene" uid="uid://daa6idpu4gkat" path="res://scenes/bullet.tscn" id="2_iywne"]
|
||||
[ext_resource type="Script" uid="uid://barmq4qhp5cvl" path="res://scripts/scene_manager.gd" id="2_p57ef"]
|
||||
[ext_resource type="PackedScene" uid="uid://dmrrbiwqptrho" path="res://scenes/trigger.tscn" id="2_yqjtg"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1yy0sybg66hh" path="res://scenes/player.tscn" id="3_lnu2h"]
|
||||
|
||||
@@ -15,6 +17,10 @@
|
||||
position = Vector2(6, 2)
|
||||
script = ExtResource("1_lbhrr")
|
||||
|
||||
[node name="SceneManager" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("2_p57ef")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(120, 233)
|
||||
scale = Vector2(3.2000012, 1)
|
||||
@@ -41,10 +47,10 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="Crate" parent="." instance=ExtResource("1_uwrxv")]
|
||||
[node name="Crate" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")]
|
||||
position = Vector2(112, 186)
|
||||
|
||||
[node name="Crate2" type="RigidBody2D" parent="."]
|
||||
[node name="Crate2" type="RigidBody2D" parent="." groups=["explodable", "pushable"]]
|
||||
position = Vector2(147.99998, 202.99994)
|
||||
rotation = 2.6595373
|
||||
metadata/_edit_group_ = true
|
||||
@@ -75,5 +81,8 @@ offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
text = "0000"
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource("2_iywne")]
|
||||
position = Vector2(45, 205.99998)
|
||||
|
||||
[connection signal="triggerFiredSignal" from="Trigger" to="." method="_on_trigger_fired"]
|
||||
[connection signal="triggerFiredSignal" from="Trigger2" to="." method="_on_trigger_fired"]
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b5n0lwes8qpu5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c3sd8uvxer0wk" path="res://scripts/grenade.gd" id="1_cvyik"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1xt3t"]
|
||||
|
||||
[node name="Grenade" type="RigidBody2D"]
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 1
|
||||
script = ExtResource("1_cvyik")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_1xt3t")
|
||||
debug_color = Color(0.7058824, 0.49411765, 0.18431373, 0.5921569)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -10,3 +10,15 @@ script = ExtResource("1_3vyb7")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_3vyb7")
|
||||
debug_color = Color(0.46210045, 0.5883958, 0.21709043, 0.41960785)
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(15, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-14, 0)
|
||||
|
||||
[node name="RightSpawn" type="Marker2D" parent="."]
|
||||
position = Vector2(15, -10)
|
||||
|
||||
[node name="LeftSpawn" type="Marker2D" parent="."]
|
||||
position = Vector2(-14, -10)
|
||||
Reference in new issue
Block a user