character animations, gamecontroller
This commit is contained in:
1 parent
205e8d43b5
commit
65ad562241
21 files changed
+556
-36
No files matched your search
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dwfife67i1fmr"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dwfife67i1fmr"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_qivxv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwukfncvqppye" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_a2saw"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dp02a"]
|
||||
size = Vector2(16, 4)
|
||||
@@ -12,4 +13,11 @@ script = ExtResource("1_qivxv")
|
||||
shape = SubResource("RectangleShape2D_dp02a")
|
||||
debug_color = Color(1, 1, 0, 0.419608)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(-5, 2)
|
||||
rotation = -3.1402
|
||||
scale = Vector2(0.171023, -0.0779315)
|
||||
texture = ExtResource("2_a2saw")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,4 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://d1ej2kiy7jcpv"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://d1ej2kiy7jcpv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b0fqd8r8n4ptj" path="res://assets/graphics/destructables/crate.png" id="1_odabg"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ixlbc"]
|
||||
|
||||
@@ -8,3 +10,8 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_ixlbc")
|
||||
debug_color = Color(0, 0.545098, 0.0431373, 0.419608)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.0947823, 0.0840096)
|
||||
texture = ExtResource("1_odabg")
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dcmyx5g6dksl8"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://dcmyx5g6dksl8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1ej2kiy7jcpv" path="res://scenes/crate.tscn" id="1_uivx3"]
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_vhl00"]
|
||||
@@ -6,6 +6,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b75mow511wmmb" path="res://scenes/player.tscn" id="3_8h5jv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwfife67i1fmr" path="res://scenes/bullet.tscn" id="5_7yfvg"]
|
||||
[ext_resource type="Script" path="res://scripts/scenemanager.gd" id="6_n2kp0"]
|
||||
[ext_resource type="Texture2D" uid="uid://btdvc25chjgd" path="res://assets/graphics/terrains/Terrain (32x32).png" id="7_v20os"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1cyeq"]
|
||||
size = Vector2(101, 20)
|
||||
@@ -15,6 +16,61 @@ distance = -395.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_mfh1j"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_3ut3v"]
|
||||
texture = ExtResource("7_v20os")
|
||||
texture_region_size = Vector2i(32, 32)
|
||||
0:0/0 = 0
|
||||
1:0/0 = 0
|
||||
2:0/0 = 0
|
||||
4:0/0 = 0
|
||||
6:0/0 = 0
|
||||
7:0/0 = 0
|
||||
9:0/0 = 0
|
||||
10:0/0 = 0
|
||||
12:0/0 = 0
|
||||
13:0/0 = 0
|
||||
15:0/0 = 0
|
||||
0:1/0 = 0
|
||||
1:1/0 = 0
|
||||
2:1/0 = 0
|
||||
4:1/0 = 0
|
||||
6:1/0 = 0
|
||||
7:1/0 = 0
|
||||
9:1/0 = 0
|
||||
10:1/0 = 0
|
||||
12:1/0 = 0
|
||||
13:1/0 = 0
|
||||
15:1/0 = 0
|
||||
16:1/0 = 0
|
||||
0:2/0 = 0
|
||||
1:2/0 = 0
|
||||
2:2/0 = 0
|
||||
4:2/0 = 0
|
||||
6:3/0 = 0
|
||||
7:3/0 = 0
|
||||
9:3/0 = 0
|
||||
10:3/0 = 0
|
||||
12:3/0 = 0
|
||||
13:3/0 = 0
|
||||
15:3/0 = 0
|
||||
16:3/0 = 0
|
||||
0:4/0 = 0
|
||||
1:4/0 = 0
|
||||
2:4/0 = 0
|
||||
4:4/0 = 0
|
||||
6:4/0 = 0
|
||||
7:4/0 = 0
|
||||
9:4/0 = 0
|
||||
10:4/0 = 0
|
||||
12:4/0 = 0
|
||||
13:4/0 = 0
|
||||
15:4/0 = 0
|
||||
16:4/0 = 0
|
||||
|
||||
[sub_resource type="TileSet" id="TileSet_ixl4j"]
|
||||
tile_size = Vector2i(32, 32)
|
||||
sources/0 = SubResource("TileSetAtlasSource_3ut3v")
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_vhl00")
|
||||
|
||||
@@ -26,22 +82,6 @@ metadata/_edit_group_ = true
|
||||
position = Vector2(-0.5, 0)
|
||||
shape = SubResource("RectangleShape2D_1cyeq")
|
||||
|
||||
[node name="RigidBody2D" parent="." instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(640, 228)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D2" parent="." instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(586, 297)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D3" parent="." instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(636, 279)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D4" parent="." instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(596, 225)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="floor" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="floor"]
|
||||
@@ -66,5 +106,30 @@ position = Vector2(309, 222)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("6_n2kp0")
|
||||
|
||||
[node name="crates" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBody2D" parent="crates" instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(640, 228)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D5" parent="crates" instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(687, 174)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D2" parent="crates" instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(586, 297)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D3" parent="crates" instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(668, 276)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="RigidBody2D4" parent="crates" instance=ExtResource("1_uivx3")]
|
||||
position = Vector2(749, 242)
|
||||
rotation = 0.806532
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||
tile_set = SubResource("TileSet_ixl4j")
|
||||
|
||||
[connection signal="areaTrigger" from="Area2D" to="." method="_on_trigger"]
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||
@@ -1,9 +1,177 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b75mow511wmmb"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://b75mow511wmmb"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/charactercontroller.gd" id="1_racyk"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2gvpgkw8np1c" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_xdqt5"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctneeupm1dwsb" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_0nv1p"]
|
||||
[ext_resource type="Texture2D" uid="uid://ccxw74sa7kyv" path="res://assets/graphics/player/run/player run 48x48.png" id="3_d2rrr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_i8a0m"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_afagl"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_euos0"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_81j0b"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nvqq6"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f5kfk"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4xfed"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hoplt"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3mtsu"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_en8us"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8f7g2"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pnfvt"]
|
||||
atlas = ExtResource("3_0nv1p")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8ui61"]
|
||||
atlas = ExtResource("3_0nv1p")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uh01i"]
|
||||
atlas = ExtResource("3_0nv1p")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qjxe0"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_taigb"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8a5ih"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4sr5y"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7ont0"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cmjei"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lwedr"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h0ov4"]
|
||||
atlas = ExtResource("3_d2rrr")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_2kykc"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_afagl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_euos0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_81j0b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nvqq6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_f5kfk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4xfed")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hoplt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3mtsu")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_en8us")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8f7g2")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pnfvt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8ui61")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uh01i")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qjxe0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_taigb")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8a5ih")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4sr5y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_7ont0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cmjei")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lwedr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h0ov4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
|
||||
script = ExtResource("1_racyk")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -23,3 +191,13 @@ position = Vector2(10, -5)
|
||||
|
||||
[node name="LeftTarget" type="Node2D" parent="."]
|
||||
position = Vector2(-10, -5)
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_2kykc")
|
||||
animation = &"jump"
|
||||
autoplay = "jump"
|
||||
frame = 2
|
||||
frame_progress = 1.0
|
||||
Reference in new issue
Block a user