player animations, variable triggers, working bullets
This commit is contained in:
1 parent
adf15b6014
commit
6be8837687
22 files changed
+534
-59
No files matched your search
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dwy0c50ndnu8k"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dwy0c50ndnu8k"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_v85g0"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsskoq57i4q43" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_ri5lc"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pwf7j"]
|
||||
size = Vector2(20, 4)
|
||||
@@ -12,4 +13,9 @@ script = ExtResource("1_v85g0")
|
||||
shape = SubResource("RectangleShape2D_pwf7j")
|
||||
debug_color = Color(0.932915, 0.177129, 0.479323, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(-6, -2)
|
||||
scale = Vector2(-0.148858, -0.156823)
|
||||
texture = ExtResource("2_ri5lc")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,24 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://blcbdwowx2gr0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://clmv1sjkccjts" path="res://assets/graphics/objects/crate.png" id="1_7dn7o"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oospb"]
|
||||
size = Vector2(23.4985, 66.016)
|
||||
|
||||
[node name="crate1" type="RigidBody2D"]
|
||||
rotation = 1.0074
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0.791419, -3.05451)
|
||||
rotation = -1.01686
|
||||
scale = Vector2(2.89246, 1)
|
||||
shape = SubResource("RectangleShape2D_oospb")
|
||||
debug_color = Color(0.907205, 0.191988, 0.583153, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(-1.37951, 0.311383)
|
||||
rotation = 0.560473
|
||||
scale = Vector2(0.228016, 0.220525)
|
||||
texture = ExtResource("1_7dn7o")
|
||||
@@ -1,38 +1,31 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dhopuj38ic6dp"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dhopuj38ic6dp"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_7cb3s"]
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_dasmg"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgos05617rcuq" path="res://scenes/trigger.tscn" id="2_070us"]
|
||||
[ext_resource type="PackedScene" uid="uid://blcbdwowx2gr0" path="res://scenes/crate.tscn" id="3_4f2of"]
|
||||
[ext_resource type="PackedScene" uid="uid://du8aftivw4k25" path="res://scenes/player.tscn" id="3_glxkt"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwy0c50ndnu8k" path="res://scenes/bullet.tscn" id="4_2bgno"]
|
||||
[ext_resource type="Script" path="res://scripts/crate.gd" id="4_4n32v"]
|
||||
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="5_6wvkt"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ox8o7"]
|
||||
radius = 31.0161
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uopew"]
|
||||
size = Vector2(70, 26)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_igau3"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oospb"]
|
||||
size = Vector2(43.1503, 26)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_8p7pp"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ape5f"]
|
||||
size = Vector2(20, 46)
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_dasmg")
|
||||
|
||||
[node name="Trigger" type="Area2D" parent="."]
|
||||
position = Vector2(570, 452)
|
||||
script = ExtResource("1_7cb3s")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trigger"]
|
||||
shape = SubResource("CircleShape2D_ox8o7")
|
||||
debug_color = Color(0.448323, 0.465614, 0.961841, 0.42)
|
||||
|
||||
[node name="Level" type="Node2D" parent="."]
|
||||
position = Vector2(-12, -3)
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(525, 412)
|
||||
position = Vector2(479, 385)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D"]
|
||||
@@ -40,16 +33,25 @@ position = Vector2(-26, 3)
|
||||
shape = SubResource("RectangleShape2D_uopew")
|
||||
|
||||
[node name="StaticBody2D3" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(525, 412)
|
||||
rotation = 2.16668
|
||||
position = Vector2(588, 494)
|
||||
rotation = 3.16193
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D3"]
|
||||
position = Vector2(-26, 3)
|
||||
shape = SubResource("RectangleShape2D_uopew")
|
||||
|
||||
[node name="StaticBody2D4" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(345, 490)
|
||||
rotation = 3.16193
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D4"]
|
||||
position = Vector2(-26, 3)
|
||||
shape = SubResource("RectangleShape2D_uopew")
|
||||
|
||||
[node name="StaticBody2D2" type="StaticBody2D" parent="Level"]
|
||||
position = Vector2(11, 464)
|
||||
position = Vector2(10, 528)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/StaticBody2D2"]
|
||||
@@ -57,28 +59,23 @@ position = Vector2(518, 20)
|
||||
shape = SubResource("WorldBoundaryShape2D_igau3")
|
||||
|
||||
[node name="crates" type="Node2D" parent="."]
|
||||
position = Vector2(13, 53)
|
||||
|
||||
[node name="crate2" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(616, 580)
|
||||
rotation = -0.385715
|
||||
metadata/_edit_group_ = true
|
||||
[node name="crate1" parent="crates" instance=ExtResource("3_4f2of")]
|
||||
position = Vector2(141, 371)
|
||||
script = ExtResource("4_4n32v")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate2"]
|
||||
position = Vector2(107.026, -85.1608)
|
||||
shape = SubResource("RectangleShape2D_oospb")
|
||||
debug_color = Color(0.907205, 0.191988, 0.583153, 0.42)
|
||||
[node name="crate2" parent="crates" instance=ExtResource("3_4f2of")]
|
||||
position = Vector2(699, 397)
|
||||
script = ExtResource("4_4n32v")
|
||||
|
||||
[node name="crate1" type="RigidBody2D" parent="crates"]
|
||||
position = Vector2(193, 264)
|
||||
rotation = 0.807772
|
||||
metadata/_edit_group_ = true
|
||||
[node name="crate3" parent="crates" instance=ExtResource("3_4f2of")]
|
||||
position = Vector2(575, 177)
|
||||
script = ExtResource("4_4n32v")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate1"]
|
||||
position = Vector2(23.712, 8.64544)
|
||||
rotation = -1.01686
|
||||
scale = Vector2(2.89246, 1)
|
||||
shape = SubResource("RectangleShape2D_oospb")
|
||||
debug_color = Color(0.907205, 0.191988, 0.583153, 0.42)
|
||||
[node name="crate4" parent="crates" instance=ExtResource("3_4f2of")]
|
||||
position = Vector2(217, 230)
|
||||
script = ExtResource("4_4n32v")
|
||||
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("3_glxkt")]
|
||||
position = Vector2(338, 226)
|
||||
@@ -90,5 +87,23 @@ position = Vector2(330, 271)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("5_6wvkt")
|
||||
|
||||
[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="."]
|
||||
rotation = -0.0128695
|
||||
|
||||
[node name="Trigger" parent="triggers" instance=ExtResource("2_070us")]
|
||||
position = Vector2(509.188, 532.597)
|
||||
rotation = -1.90254
|
||||
effect = "destroy"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/Trigger"]
|
||||
shape = SubResource("CircleShape2D_8p7pp")
|
||||
debug_color = Color(0.622849, 0.37564, 0.95389, 0.42)
|
||||
|
||||
[node name="powerup" parent="triggers" instance=ExtResource("2_070us")]
|
||||
position = Vector2(597.12, 460.723)
|
||||
effect = "powerup"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/powerup"]
|
||||
position = Vector2(0, -13)
|
||||
shape = SubResource("RectangleShape2D_ape5f")
|
||||
debug_color = Color(0.644817, 0.359472, 0.952285, 0.42)
|
||||
@@ -1,9 +1,177 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://du8aftivw4k25"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://du8aftivw4k25"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_p8gev"]
|
||||
[ext_resource type="Texture2D" uid="uid://70imyp6vsgvv" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_vqtu4"]
|
||||
[ext_resource type="Texture2D" uid="uid://5ger8sg6iqqm" path="res://assets/graphics/player/jump/player jump 48x48(1).png" id="3_k55ht"]
|
||||
[ext_resource type="Texture2D" uid="uid://crd320y5xhgwf" path="res://assets/graphics/player/run/player run 48x48(1).png" id="3_olacu"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_a75m4"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lxsaf"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nc8f5"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8t17o"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_un46h"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yyi6q"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_e17dv"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4i4mp"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g1pat"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_udrwm"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_64ecg"]
|
||||
atlas = ExtResource("2_vqtu4")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0w8hc"]
|
||||
atlas = ExtResource("3_k55ht")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gnkqd"]
|
||||
atlas = ExtResource("3_k55ht")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xblxa"]
|
||||
atlas = ExtResource("3_k55ht")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_14w4b"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ed7pw"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bf8mn"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3jaw1"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nfpx8"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vv4dg"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pevx6"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ytupl"]
|
||||
atlas = ExtResource("3_olacu")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_upnp5"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lxsaf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nc8f5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8t17o")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_un46h")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yyi6q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_e17dv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4i4mp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g1pat")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_udrwm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_64ecg")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0w8hc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gnkqd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xblxa")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 9.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_14w4b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ed7pw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bf8mn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3jaw1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nfpx8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vv4dg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pevx6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ytupl")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource("1_p8gev")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -23,3 +191,14 @@ position = Vector2(11, -10)
|
||||
|
||||
[node name="leftTarget" type="Node2D" parent="."]
|
||||
position = Vector2(-15, -10)
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -7)
|
||||
sprite_frames = SubResource("SpriteFrames_upnp5")
|
||||
animation = &"jump"
|
||||
autoplay = "jump"
|
||||
frame = 2
|
||||
frame_progress = 1.0
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
@@ -0,0 +1,9 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dgos05617rcuq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_3piuk"]
|
||||
|
||||
[node name="Trigger" type="Area2D"]
|
||||
script = ExtResource("1_3piuk")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
Reference in new issue
Block a user