player animations, variable triggers, working bullets
This commit is contained in:
1 parent
1ed49408f6
commit
452e3a402d
22 files changed
+511
-69
No files matched your search
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b1jq6yi0dh3c0"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://b1jq6yi0dh3c0"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_okq17"]
|
||||
[ext_resource type="Texture2D" uid="uid://bq0yaqauut372" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_ig66t"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_va0yp"]
|
||||
size = Vector2(10, 4)
|
||||
@@ -12,4 +13,9 @@ script = ExtResource("1_okq17")
|
||||
shape = SubResource("RectangleShape2D_va0yp")
|
||||
debug_color = Color(0.952024, 0.180224, 0.327437, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(-3, 2)
|
||||
scale = Vector2(-0.0800002, 0.0769233)
|
||||
texture = ExtResource("2_ig66t")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://celwbq1syhdoa"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://di215h0o7ybli" path="res://assets/graphics/objects/crate.png" id="1_2vv2l"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0u5k2"]
|
||||
size = Vector2(34, 36)
|
||||
|
||||
[node name="crate1" type="RigidBody2D"]
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_0u5k2")
|
||||
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, 3)
|
||||
scale = Vector2(0.13, 0.13)
|
||||
texture = ExtResource("1_2vv2l")
|
||||
@@ -1,21 +1,22 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bt6uaac8wfn8k"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bt6uaac8wfn8k"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_8ewqq"]
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_wwyby"]
|
||||
[ext_resource type="PackedScene" uid="uid://bibqnht5dooss" path="res://scenes/trigger.tscn" id="2_psv8k"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjvyslsoa7olc" path="res://scenes/player.tscn" id="3_771dm"]
|
||||
[ext_resource type="PackedScene" uid="uid://celwbq1syhdoa" path="res://scenes/crate.tscn" id="3_ek1d4"]
|
||||
[ext_resource type="Script" path="res://scripts/crate.gd" id="4_5sp5n"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1jq6yi0dh3c0" path="res://scenes/bullet.tscn" id="4_a2pol"]
|
||||
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="5_xhw0f"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_gmy8j"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_civmy"]
|
||||
radius = 21.0238
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ggdp1"]
|
||||
size = Vector2(72, 20)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0u5k2"]
|
||||
size = Vector2(34, 36)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_opmvx"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1ymsv"]
|
||||
size = Vector2(20, 40)
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_wwyby")
|
||||
@@ -27,15 +28,6 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("WorldBoundaryShape2D_gmy8j")
|
||||
|
||||
[node name="Trigger" type="Area2D" parent="."]
|
||||
position = Vector2(700, 476)
|
||||
script = ExtResource("1_8ewqq")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trigger"]
|
||||
shape = SubResource("CircleShape2D_civmy")
|
||||
debug_color = Color(0.611909, 0.392035, 0.935088, 0.42)
|
||||
|
||||
[node name="level" type="Node2D" parent="."]
|
||||
|
||||
[node name="Brick" type="StaticBody2D" parent="level"]
|
||||
@@ -69,43 +61,24 @@ shape = SubResource("RectangleShape2D_ggdp1")
|
||||
|
||||
[node name="crates" type="Node2D" parent="."]
|
||||
|
||||
[node name="crate1" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(446, 462)
|
||||
rotation = -0.516507
|
||||
metadata/_edit_group_ = true
|
||||
[node name="crate1" parent="crates" instance=ExtResource("3_ek1d4")]
|
||||
position = Vector2(481, 369)
|
||||
script = ExtResource("4_5sp5n")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate1"]
|
||||
shape = SubResource("RectangleShape2D_0u5k2")
|
||||
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
|
||||
[node name="crate2" parent="crates" instance=ExtResource("3_ek1d4")]
|
||||
position = Vector2(534, 397)
|
||||
rotation = 0.380482
|
||||
script = ExtResource("4_5sp5n")
|
||||
|
||||
[node name="crate3" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(376, 466)
|
||||
rotation = -0.516507
|
||||
metadata/_edit_group_ = true
|
||||
[node name="crate4" parent="crates" instance=ExtResource("3_ek1d4")]
|
||||
position = Vector2(628, 345)
|
||||
rotation = 0.380482
|
||||
script = ExtResource("4_5sp5n")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate3"]
|
||||
shape = SubResource("RectangleShape2D_0u5k2")
|
||||
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
|
||||
|
||||
[node name="crate2" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(920, 473)
|
||||
rotation = -1.2792
|
||||
scale = Vector2(1, 1)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate2"]
|
||||
shape = SubResource("RectangleShape2D_0u5k2")
|
||||
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
|
||||
|
||||
[node name="crate4" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(868, 476)
|
||||
rotation = -1.2792
|
||||
scale = Vector2(1, 1)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate4"]
|
||||
shape = SubResource("RectangleShape2D_0u5k2")
|
||||
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
|
||||
[node name="crate3" parent="crates" instance=ExtResource("3_ek1d4")]
|
||||
position = Vector2(695, 332)
|
||||
rotation = -0.760964
|
||||
script = ExtResource("4_5sp5n")
|
||||
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("3_771dm")]
|
||||
position = Vector2(461, 282)
|
||||
@@ -117,5 +90,20 @@ position = Vector2(284, 341)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("5_xhw0f")
|
||||
|
||||
[connection signal="areaTrigger" from="Trigger" to="." method="_on_trigger_area_trigger"]
|
||||
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
|
||||
[node name="triggers" type="Node2D" parent="."]
|
||||
|
||||
[node name="Trigger" parent="triggers" instance=ExtResource("2_psv8k")]
|
||||
effect = "destroy"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/Trigger"]
|
||||
shape = SubResource("CircleShape2D_opmvx")
|
||||
debug_color = Color(0.731092, 0.294274, 0.91724, 0.42)
|
||||
|
||||
[node name="powerup" parent="triggers" instance=ExtResource("2_psv8k")]
|
||||
position = Vector2(791, 407)
|
||||
effect = "powerup"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/powerup"]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("RectangleShape2D_1ymsv")
|
||||
debug_color = Color(0.156093, 0.622347, 0.484765, 0.42)
|
||||
@@ -1,9 +1,177 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cjvyslsoa7olc"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://cjvyslsoa7olc"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_ffdhb"]
|
||||
[ext_resource type="Texture2D" uid="uid://d6cdeej48ryk" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_ekybh"]
|
||||
[ext_resource type="Texture2D" uid="uid://bo4lwotnk3cs" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_fab18"]
|
||||
[ext_resource type="Texture2D" uid="uid://dny0tvbhrt1jh" path="res://assets/graphics/player/run/player run 48x48.png" id="3_q7el6"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_q23dn"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3ufnv"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y70bw"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tl2bv"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tkkjs"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0fgmq"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vjujd"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_307af"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nn3sj"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_coouw"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w02ps"]
|
||||
atlas = ExtResource("2_ekybh")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u2bek"]
|
||||
atlas = ExtResource("3_fab18")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wly4a"]
|
||||
atlas = ExtResource("3_fab18")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_p6fm4"]
|
||||
atlas = ExtResource("3_fab18")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_q2tlv"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a5a0q"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qajev"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pkvyv"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d0umq"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cso7h"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_08m43"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wuxnh"]
|
||||
atlas = ExtResource("3_q7el6")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ok1w6"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3ufnv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y70bw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tl2bv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tkkjs")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0fgmq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vjujd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_307af")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nn3sj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_coouw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w02ps")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_u2bek")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wly4a")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_p6fm4")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 9.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_q2tlv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a5a0q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qajev")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pkvyv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d0umq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cso7h")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_08m43")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wuxnh")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource("1_ffdhb")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -23,3 +191,12 @@ position = Vector2(18, -15)
|
||||
|
||||
[node name="leftTarget" type="Node2D" parent="."]
|
||||
position = Vector2(-19, -15)
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -7)
|
||||
sprite_frames = SubResource("SpriteFrames_ok1w6")
|
||||
animation = &"jump"
|
||||
autoplay = "jump"
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bibqnht5dooss"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_x8vqb"]
|
||||
|
||||
[node name="Trigger" type="Area2D"]
|
||||
position = Vector2(700, 476)
|
||||
script = ExtResource("1_x8vqb")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
Reference in new issue
Block a user