tilemap, state machine, player animations, scenemanager.
This commit is contained in:
1 parent
eac97fda20
commit
81ae9e63e5
14 files changed
+484
-21
No files matched your search
+73
-5
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://c3nfwlo4i3hne"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://c3nfwlo4i3hne"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bt6s0tpg6lrha" path="res://Scripts/gamecontroller.gd" id="1_llgwy"]
|
||||
[ext_resource type="Script" uid="uid://bukc3pev3h3fq" path="res://Scripts/scene_manager.gd" id="2_1l0tm"]
|
||||
@@ -6,10 +6,66 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cjlmg7kqu5u5t" path="res://Scenes/crate.tscn" id="2_wowpa"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5qsdhrjyxbr1" path="res://Scenes/player.tscn" id="2_wrm1d"]
|
||||
[ext_resource type="Script" uid="uid://b7utyaqyc131x" path="res://Scripts/crate.gd" id="3_i6g32"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu07bj38jivdy" path="res://Assets/Graphics/enviroment/terrain/Terrain (32x32).png" id="3_v158k"]
|
||||
[ext_resource type="PackedScene" uid="uid://clevnux6u2ybx" path="res://Scenes/bullet.tscn" id="6_i6g32"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_h4fw4"]
|
||||
texture = ExtResource("3_v158k")
|
||||
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_ldgsr"]
|
||||
tile_size = Vector2i(32, 32)
|
||||
sources/0 = SubResource("TileSetAtlasSource_h4fw4")
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ejxeh"]
|
||||
size = Vector2(54, 20)
|
||||
size = Vector2(93, 18)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_0uq2f"]
|
||||
|
||||
@@ -23,11 +79,18 @@ script = ExtResource("1_llgwy")
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("2_1l0tm")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(191, 195)
|
||||
tile_map_data = PackedByteArray(0, 0, 255, 255, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0)
|
||||
tile_set = SubResource("TileSet_ldgsr")
|
||||
|
||||
[node name="Platform" type="StaticBody2D" parent="."]
|
||||
position = Vector2(213, 228)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"]
|
||||
position = Vector2(-8, 8)
|
||||
shape = SubResource("RectangleShape2D_ejxeh")
|
||||
|
||||
[node name="Crate" parent="." instance=ExtResource("2_wowpa")]
|
||||
@@ -44,8 +107,7 @@ shape = SubResource("WorldBoundaryShape2D_0uq2f")
|
||||
[node name="Player" parent="." instance=ExtResource("2_wrm1d")]
|
||||
position = Vector2(191, 195)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("2_ja4if")]
|
||||
position = Vector2(279, 218)
|
||||
[node name="Camera2D" type="Camera2D" parent="Player"]
|
||||
|
||||
[node name="Bullet" parent="." instance=ExtResource("6_i6g32")]
|
||||
position = Vector2(101, 87)
|
||||
@@ -54,4 +116,10 @@ position = Vector2(101, 87)
|
||||
shape = SubResource("RectangleShape2D_1l0tm")
|
||||
debug_color = Color(0.997962, 0, 0.153889, 0.42)
|
||||
|
||||
[connection signal="areaTriggerSignal" from="Area2D" to="." method="_on_trigger"]
|
||||
[node name="triggers" type="Node2D" parent="."]
|
||||
|
||||
[node name="player_hurt" parent="triggers" instance=ExtResource("2_ja4if")]
|
||||
position = Vector2(294, 211)
|
||||
effect = "player_hurt"
|
||||
|
||||
[connection signal="areaTriggerSignal" from="triggers/player_hurt" to="." method="_on_trigger"]
|
||||
+189
-3
@@ -1,13 +1,185 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c5qsdhrjyxbr1"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://c5qsdhrjyxbr1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crc2khytlo6r" path="res://Scripts/character_1.gd" id="1_v0iea"]
|
||||
[ext_resource type="Texture2D" uid="uid://e6b480uw3m3f" path="res://Assets/Graphics/Player/Idle/Player Idle 48x48.png" id="2_cvnsp"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3p0putnmoxj6" path="res://Assets/Graphics/Player/Jump_Fall/player jump 48x48.png" id="2_vgqql"]
|
||||
[ext_resource type="Texture2D" uid="uid://liht8gn65vyk" path="res://Assets/Graphics/Player/Run/player run 48x48.png" id="3_6t5aa"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4vo57"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_olqyp"]
|
||||
atlas = ExtResource("2_vgqql")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6t5aa"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vgqql"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fkybt"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x3wgy"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3smsa"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8erm5"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ek2"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tx1dd"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gymyn"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pu2lt"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wpjfl"]
|
||||
atlas = ExtResource("2_vgqql")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bi64h"]
|
||||
atlas = ExtResource("2_vgqql")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ukyrk"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7dp3o"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h4iuc"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fd4e3"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qqcod"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_igrcy"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fs7ks"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l6n3p"]
|
||||
atlas = ExtResource("3_6t5aa")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ukyrk"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_olqyp")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"fall",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6t5aa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vgqql")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fkybt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_x3wgy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3smsa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8erm5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_f1ek2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tx1dd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gymyn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pu2lt")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wpjfl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bi64h")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ukyrk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_7dp3o")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h4iuc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fd4e3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qqcod")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_igrcy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fs7ks")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_l6n3p")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
position = Vector2(-21, -4)
|
||||
position = Vector2(-20, -4)
|
||||
script = ExtResource("1_v0iea")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(21, 4)
|
||||
@@ -27,3 +199,17 @@ metadata/_edit_group_ = true
|
||||
|
||||
[node name="LeftSpawn" type="Node2D" parent="."]
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="JumpBufferTimer" type="Timer" parent="."]
|
||||
wait_time = 0.8
|
||||
one_shot = true
|
||||
|
||||
[node name="playergraphic" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(22, 1)
|
||||
scale = Vector2(0.833333, 0.770833)
|
||||
sprite_frames = SubResource("SpriteFrames_ukyrk")
|
||||
animation = &"fall"
|
||||
autoplay = "idle"
|
||||
|
||||
[connection signal="animation_finished" from="playergraphic" to="." method="_on_animation_finished"]
|
||||
Reference in new issue
Block a user