player animations, variable triggers, working bullets
This commit is contained in:
1 parent
5dcc0e729b
commit
b52ead2557
22 files changed
+514
-70
No files matched your search
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cy7x36mdb5oxu"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cy7x36mdb5oxu"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/bullet.gd" id="1_74gno"]
|
||||
[ext_resource type="Texture2D" uid="uid://n3642h5jwslv" path="res://Assets/graphics/projectiles/pixel_bullet.png" id="2_abfvl"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vnal2"]
|
||||
size = Vector2(20, 4)
|
||||
@@ -12,4 +13,9 @@ script = ExtResource("1_74gno")
|
||||
shape = SubResource("RectangleShape2D_vnal2")
|
||||
debug_color = Color(0.857955, 0.291109, 0.565473, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(-5, 2)
|
||||
scale = Vector2(-0.14505, 0.0734948)
|
||||
texture = ExtResource("2_abfvl")
|
||||
|
||||
[connection signal="body_shape_entered" from="." to="." method="_on_body_shape_entered"]
|
||||
@@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bad28kns14sve"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dbdeeja34rpcm" path="res://Assets/graphics/objects/crate.png" id="1_jxgyj"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_57esh"]
|
||||
size = Vector2(52, 56)
|
||||
|
||||
[node name="Crate1" type="RigidBody2D"]
|
||||
position = Vector2(-2, -2)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_57esh")
|
||||
debug_color = Color(0.812962, 0.406946, 0.115236, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, 4)
|
||||
scale = Vector2(0.186279, 0.198245)
|
||||
texture = ExtResource("1_jxgyj")
|
||||
@@ -1,21 +1,22 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cpuc12n61qg6b"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://cpuc12n61qg6b"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/trigger.gd" id="1_a0h8u"]
|
||||
[ext_resource type="Script" path="res://Scripts/gamecontroller.gd" id="1_amnm6"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0ve3ds64sk3p" path="res://Scenes/trigger.tscn" id="2_k6dhr"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0snboj7mbad5" path="res://Scenes/player.tscn" id="3_3yq6m"]
|
||||
[ext_resource type="PackedScene" uid="uid://bad28kns14sve" path="res://Scenes/crate.tscn" id="3_gnicf"]
|
||||
[ext_resource type="Script" path="res://Scripts/crate.gd" id="4_5gakl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cy7x36mdb5oxu" path="res://Scenes/bullet.tscn" id="4_bk63h"]
|
||||
[ext_resource type="Script" path="res://Scripts/scene_manager.gd" id="5_4nsas"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_qkap3"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_skxer"]
|
||||
radius = 48.0
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yfjal"]
|
||||
size = Vector2(65, 20)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_57esh"]
|
||||
size = Vector2(52, 56)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_fgkk4"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ilkes"]
|
||||
size = Vector2(20, 134)
|
||||
|
||||
[node name="FebFabGame" type="Node2D"]
|
||||
script = ExtResource("1_amnm6")
|
||||
@@ -27,15 +28,6 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"]
|
||||
shape = SubResource("WorldBoundaryShape2D_qkap3")
|
||||
|
||||
[node name="Trigger" type="Area2D" parent="."]
|
||||
position = Vector2(727, 529)
|
||||
script = ExtResource("1_a0h8u")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trigger"]
|
||||
shape = SubResource("CircleShape2D_skxer")
|
||||
debug_color = Color(0.50428, 0.445656, 0.95237, 0.42)
|
||||
|
||||
[node name="Level" type="Node2D" parent="."]
|
||||
|
||||
[node name="Brick" type="StaticBody2D" parent="Level"]
|
||||
@@ -65,44 +57,23 @@ shape = SubResource("RectangleShape2D_yfjal")
|
||||
|
||||
[node name="Crates" type="Node2D" parent="."]
|
||||
|
||||
[node name="Crate1" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(642, 251)
|
||||
rotation = -0.585206
|
||||
metadata/_edit_group_ = true
|
||||
[node name="Crate1" parent="Crates" instance=ExtResource("3_gnicf")]
|
||||
position = Vector2(604, 239)
|
||||
rotation = -0.26268
|
||||
script = ExtResource("4_5gakl")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/Crate1"]
|
||||
shape = SubResource("RectangleShape2D_57esh")
|
||||
debug_color = Color(0.812962, 0.406946, 0.115236, 0.42)
|
||||
[node name="Crate2" parent="Crates" instance=ExtResource("3_gnicf")]
|
||||
position = Vector2(340, 130)
|
||||
rotation = 0.262166
|
||||
script = ExtResource("4_5gakl")
|
||||
|
||||
[node name="Crate4" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(353, 97)
|
||||
rotation = 1.62165
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/Crate4"]
|
||||
shape = SubResource("RectangleShape2D_57esh")
|
||||
debug_color = Color(0.812962, 0.406946, 0.115236, 0.42)
|
||||
|
||||
[node name="Crate2" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(664, 155)
|
||||
rotation = 0.531432
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/Crate2"]
|
||||
shape = SubResource("RectangleShape2D_57esh")
|
||||
debug_color = Color(0.812962, 0.406946, 0.115236, 0.42)
|
||||
|
||||
[node name="Crate3" type="RigidBody2D" parent="Crates"]
|
||||
position = Vector2(843, 88)
|
||||
rotation = 0.531432
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Crates/Crate3"]
|
||||
shape = SubResource("RectangleShape2D_57esh")
|
||||
debug_color = Color(0.812962, 0.406946, 0.115236, 0.42)
|
||||
[node name="Crate3" parent="Crates" instance=ExtResource("3_gnicf")]
|
||||
position = Vector2(849, 118)
|
||||
rotation = -0.248451
|
||||
script = ExtResource("4_5gakl")
|
||||
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("3_3yq6m")]
|
||||
position = Vector2(440, 243)
|
||||
position = Vector2(158, 94)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("4_bk63h")]
|
||||
position = Vector2(236, 307)
|
||||
@@ -111,5 +82,20 @@ position = Vector2(236, 307)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("5_4nsas")
|
||||
|
||||
[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_k6dhr")]
|
||||
effect = "destroy"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/Trigger"]
|
||||
shape = SubResource("CircleShape2D_fgkk4")
|
||||
debug_color = Color(0.62821, 0.394472, 0.903221, 0.42)
|
||||
|
||||
[node name="powerup" parent="triggers" instance=ExtResource("2_k6dhr")]
|
||||
position = Vector2(949, 469)
|
||||
effect = "powerup"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/powerup"]
|
||||
position = Vector2(4, -1)
|
||||
shape = SubResource("RectangleShape2D_ilkes")
|
||||
debug_color = Color(0.304464, 0.623664, 0.204875, 0.42)
|
||||
@@ -1,9 +1,177 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b0snboj7mbad5"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://b0snboj7mbad5"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Player.gd" id="1_mjl5w"]
|
||||
[ext_resource type="Texture2D" uid="uid://jnn6hcmfgyfo" path="res://Assets/graphics/player/idle/Player Idle 48x48.png" id="2_20p21"]
|
||||
[ext_resource type="Texture2D" uid="uid://ciaht230dnmu3" path="res://Assets/graphics/player/run/player run 48x48.png" id="3_ergv2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bv1oc2iwohejk" path="res://Assets/graphics/player/jump/player jump 48x48.png" id="3_riawr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_xiumq"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u237n"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mwuqw"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gtkhb"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vtevr"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jrohu"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rgamt"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_puq2s"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ppcu1"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0p4g1"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dg258"]
|
||||
atlas = ExtResource("2_20p21")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ehgkh"]
|
||||
atlas = ExtResource("3_riawr")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w5jq5"]
|
||||
atlas = ExtResource("3_riawr")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d44wy"]
|
||||
atlas = ExtResource("3_riawr")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yr6yg"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tefua"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f0env"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uigva"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kiw7g"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5wcjn"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_htmkr"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dyj62"]
|
||||
atlas = ExtResource("3_ergv2")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_tbufb"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_u237n")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mwuqw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gtkhb")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vtevr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jrohu")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rgamt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_puq2s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ppcu1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0p4g1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dg258")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ehgkh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w5jq5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d44wy")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 9.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yr6yg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tefua")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_f0env")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uigva")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kiw7g")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5wcjn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_htmkr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dyj62")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource("1_mjl5w")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -23,3 +191,13 @@ position = Vector2(24, -26)
|
||||
|
||||
[node name="leftTarget" type="Node2D" parent="."]
|
||||
position = Vector2(-25, -26)
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(2, -11)
|
||||
scale = Vector2(1.54734, 1.26736)
|
||||
sprite_frames = SubResource("SpriteFrames_tbufb")
|
||||
animation = &"jump"
|
||||
autoplay = "jump"
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://d0ve3ds64sk3p"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/trigger.gd" id="1_0ht8v"]
|
||||
|
||||
[node name="Trigger" type="Area2D"]
|
||||
position = Vector2(727, 529)
|
||||
script = ExtResource("1_0ht8v")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
Reference in new issue
Block a user