shove attack raycasts, input maps, bullets object pooling, dynamic instantiation, grenades
This commit is contained in:
1 parent
39a2c3e097
commit
b8e6b3f2ce
12 files changed
+251
-17
No files matched your search
@@ -0,0 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://daa6idpu4gkat"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ock81bqismk0" path="res://scripts/bullet.gd" id="1_mkf8s"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h1aey"]
|
||||
size = Vector2(8, 6)
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource("1_mkf8s")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_h1aey")
|
||||
debug_color = Color(0.95943683, 0.18113726, 0.24279165, 0.41960785)
|
||||
+17
-4
@@ -1,9 +1,12 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cy1i6ucex6m0d"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://cy1i6ucex6m0d"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crhflh7kooolf" 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="Script" uid="uid://co43e72devw6g" 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"]
|
||||
[ext_resource type="PackedScene" uid="uid://daa6idpu4gkat" path="res://scenes/bullet.tscn" id="5_iywne"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5n0lwes8qpu5" path="res://scenes/grenade.tscn" id="7_u5sy4"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8cj0n"]
|
||||
size = Vector2(68, 35)
|
||||
@@ -15,6 +18,10 @@ size = Vector2(68, 35)
|
||||
[node name="Game" type="Node2D"]
|
||||
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(394, 353)
|
||||
metadata/_edit_group_ = true
|
||||
@@ -40,10 +47,10 @@ metadata/_edit_group_ = true
|
||||
position = Vector2(0, 7.5)
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="Crate" parent="." instance=ExtResource("1_uwrxv")]
|
||||
[node name="Crate" parent="." groups=["pushable", "splodable"] instance=ExtResource("1_uwrxv")]
|
||||
position = Vector2(406.00003, 327)
|
||||
|
||||
[node name="RigidBody2D2" type="RigidBody2D" parent="."]
|
||||
[node name="RigidBody2D2" type="RigidBody2D" parent="." groups=["pushable", "splodable"]]
|
||||
position = Vector2(243, 371)
|
||||
rotation = -1.099222
|
||||
metadata/_edit_group_ = true
|
||||
@@ -52,7 +59,7 @@ metadata/_edit_group_ = true
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.84557056, 0.3727497, 0.1753774, 0.41960785)
|
||||
|
||||
[node name="RigidBody2D3" type="RigidBody2D" parent="."]
|
||||
[node name="RigidBody2D3" type="RigidBody2D" parent="." groups=["pushable", "splodable"]]
|
||||
position = Vector2(502, 230)
|
||||
rotation = -1.099222
|
||||
metadata/_edit_group_ = true
|
||||
@@ -79,5 +86,11 @@ intent = "powerup"
|
||||
position = Vector2(379, 331)
|
||||
BUMP_POWER = 50
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource("5_iywne")]
|
||||
position = Vector2(293, 329)
|
||||
|
||||
[node name="Grenade" parent="." instance=ExtResource("7_u5sy4")]
|
||||
position = Vector2(380, 307)
|
||||
|
||||
[connection signal="triggerFiredSignal" from="Trigger" to="." method="_on_trigger_fired"]
|
||||
[connection signal="triggerFiredSignal" from="Trigger2" to="." method="_on_trigger_fired"]
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b5n0lwes8qpu5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cev3cg5mdn3it" path="res://scripts/grenade.gd" id="1_cvyik"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1xt3t"]
|
||||
radius = 3.0
|
||||
|
||||
[node name="Grenade" type="RigidBody2D"]
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 2
|
||||
script = ExtResource("1_cvyik")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_1xt3t")
|
||||
debug_color = Color(0.6279718, 0.5294392, 0.11152003, 0.41960785)
|
||||
|
||||
[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.46677285, 0.59072345, 0.09206382, 0.41960785)
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(16, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-16, 0)
|
||||
|
||||
[node name="RightSpawn" type="Marker2D" parent="."]
|
||||
position = Vector2(14, -8)
|
||||
|
||||
[node name="LeftSpawn" type="Marker2D" parent="."]
|
||||
position = Vector2(-13, -8)
|
||||
Reference in new issue
Block a user