added shove, raycasts, bullet factory, bullets and scene manager
This commit is contained in:
1 parent
e6c049af5c
commit
bdb5b5f1fd
13 files changed
+244
-93
No files matched your search
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://55qojpxdkp66"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cwj2jevwb1w6d" path="res://scripts/bullet.gd" id="1_mkf8s"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y25gk"]
|
||||
size = Vector2(14, 6)
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_mkf8s")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_y25gk")
|
||||
debug_color = Color(0.904786, 0, 0.0445938, 0.42)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dbg8j3e6xwnil"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dknsbg2xfjd1q" path="res://scripts/crate.gd" id="1_b66cd"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uwrxv"]
|
||||
|
||||
[node name="Crate" type="RigidBody2D" groups=["pushables"]]
|
||||
script = ExtResource("1_b66cd")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.888982, 0.327148, 7.70092e-07, 0.42)
|
||||
+25
-79
@@ -1,112 +1,89 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ivno5uoip3x"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://ivno5uoip3x"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dyts3mw1bhitc" path="res://scripts/game_controller.gd" id="1_lnu2h"]
|
||||
[ext_resource type="Script" uid="uid://cq5wc2smevldf" path="res://scripts/player.gd" id="1_uwrxv"]
|
||||
[ext_resource type="Script" uid="uid://7iv62cso22ox" path="res://scripts/scene_manager.gd" id="2_lbhrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsvb5ohioaj4w" path="res://scenes/player.tscn" id="2_lnu2h"]
|
||||
[ext_resource type="PackedScene" uid="uid://duq681f4tr7uv" path="res://scenes/trigger.tscn" id="3_lnu2h"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8cj0n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dbg8j3e6xwnil" path="res://scenes/crate.tscn" id="4_iywne"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8cj0n"]
|
||||
size = Vector2(58, 20)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_uwrxv"]
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_iywne"]
|
||||
bounce = 0.35
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uwrxv"]
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_uwrxv"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_lnu2h")
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(312, 286)
|
||||
script = ExtResource("1_uwrxv")
|
||||
push_power = 150.0
|
||||
metadata/_edit_group_ = true
|
||||
[node name="SceneManager" type="Node" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("2_lbhrr")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("CapsuleShape2D_8cj0n")
|
||||
debug_color = Color(0.804881, 0.18457, 0.906085, 0.42)
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("2_lnu2h")]
|
||||
position = Vector2(284, 616)
|
||||
|
||||
[node name="Level" type="Node2D" parent="."]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(150, 569)
|
||||
position = Vector2(192, 512)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D8" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(211, 582)
|
||||
position = Vector2(256, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D8"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D9" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(271, 576)
|
||||
position = Vector2(320, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D9"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D10" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(354, 576)
|
||||
position = Vector2(576, 512)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D10"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D11" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(74, 569)
|
||||
position = Vector2(64, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D11"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D12" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(110, 543)
|
||||
position = Vector2(128, 512)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D12"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D2" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(475, 528)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D2"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D3" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(536, 534)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D3"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D4" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(596, 540)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D4"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D5" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(530, 562)
|
||||
position = Vector2(512, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D5"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D6" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(581, 601)
|
||||
position = Vector2(576, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D6"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="StaticBody2D7" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(682, 574)
|
||||
position = Vector2(640, 576)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D7"]
|
||||
@@ -114,6 +91,7 @@ shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="Floor" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(378, 643)
|
||||
physics_material_override = SubResource("PhysicsMaterial_iywne")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/Floor"]
|
||||
@@ -137,41 +115,9 @@ shape = SubResource("WorldBoundaryShape2D_uwrxv")
|
||||
|
||||
[node name="Crates" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(577, 177)
|
||||
rotation = 0.518839
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/RigidBody2D"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.888982, 0.327148, 7.70092e-07, 0.42)
|
||||
|
||||
[node name="RigidBody2D2" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(476, 151)
|
||||
rotation = -0.157975
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/RigidBody2D2"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.888982, 0.327148, 7.70092e-07, 0.42)
|
||||
|
||||
[node name="RigidBody2D3" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(507, 370)
|
||||
rotation = -2.02378
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/RigidBody2D3"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.888982, 0.327148, 7.70092e-07, 0.42)
|
||||
|
||||
[node name="RigidBody2D4" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(613, 468)
|
||||
rotation = 2.13819
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/RigidBody2D4"]
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.888982, 0.327148, 7.70092e-07, 0.42)
|
||||
[node name="Crate" parent="Crates" instance=ExtResource("4_iywne")]
|
||||
position = Vector2(420, 534)
|
||||
rotation = -0.35143
|
||||
|
||||
[node name="Trigger" parent="." instance=ExtResource("3_lnu2h")]
|
||||
position = Vector2(299, 487)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dsvb5ohioaj4w"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cq5wc2smevldf" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8cj0n"]
|
||||
height = 20.0
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource("1_3vyb7")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CapsuleShape2D_8cj0n")
|
||||
debug_color = Color(0.804881, 0.18457, 0.906085, 0.42)
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(18, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-18, 0)
|
||||
|
||||
[node name="RightSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(12, -6)
|
||||
|
||||
[node name="LeftSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(-12, -6)
|
||||
Reference in new issue
Block a user