sprites, character animations
This commit is contained in:
1 parent
8adfc2b674
commit
6650e5ae9d
21 files changed
+554
-31
No files matched your search
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c7v063yofnirp"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c7v063yofnirp"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_au5n7"]
|
||||
[ext_resource type="Texture2D" uid="uid://bk0aakyo6grve" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_pcjo1"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hrjpd"]
|
||||
size = Vector2(14, 6)
|
||||
@@ -12,4 +13,11 @@ script = ExtResource("1_au5n7")
|
||||
shape = SubResource("RectangleShape2D_hrjpd")
|
||||
debug_color = Color(0.92607, 0.250785, 0.273463, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(-5, -3)
|
||||
rotation = 3.14159
|
||||
scale = Vector2(0.117753, 0.117753)
|
||||
texture = ExtResource("2_pcjo1")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,11 +1,19 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://63qb2drh1l33"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://63qb2drh1l33"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b283wfk58dltk" path="res://assets/graphics/destructables/crate.png" id="1_hy1ys"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jflwv"]
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" groups=["box", "destructable"]]
|
||||
rotation = -2.29882
|
||||
rotation = -3.14159
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_jflwv")
|
||||
debug_color = Color(0.968627, 0.117647, 0.345098, 0.419608)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(-8.74228e-08, 1)
|
||||
scale = Vector2(0.0686591, 0.0686591)
|
||||
texture = ExtResource("1_hy1ys")
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cxnmaxykhbgaq"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://cxnmaxykhbgaq"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://63qb2drh1l33" path="res://scenes/crate.tscn" id="1_0wmww"]
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_5dy8j"]
|
||||
@@ -6,6 +6,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://c1cuiluq1fcpk" path="res://scenes/player.tscn" id="3_w28al"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7v063yofnirp" path="res://scenes/bullet.tscn" id="5_drh85"]
|
||||
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="6_duuox"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7gfcwmohp6th" path="res://assets/graphics/terrains/Terrain (32x32).png" id="7_ogiiy"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_f1luk"]
|
||||
size = Vector2(172, 20)
|
||||
@@ -15,6 +16,61 @@ size = Vector2(172, 20)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_wdyhk"]
|
||||
radius = 34.1321
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_06fpy"]
|
||||
texture = ExtResource("7_ogiiy")
|
||||
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_51dbi"]
|
||||
tile_size = Vector2i(32, 32)
|
||||
sources/0 = SubResource("TileSetAtlasSource_06fpy")
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
script = ExtResource("1_5dy8j")
|
||||
|
||||
@@ -25,14 +81,6 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("RectangleShape2D_f1luk")
|
||||
|
||||
[node name="RigidBody2D" parent="." instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(297, 129)
|
||||
rotation = 0.688747
|
||||
|
||||
[node name="RigidBody2D2" parent="." instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(391, 64)
|
||||
rotation = 0.358379
|
||||
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("3_w28al")]
|
||||
|
||||
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
|
||||
@@ -51,9 +99,6 @@ metadata/_edit_group_ = true
|
||||
shape = SubResource("CircleShape2D_wdyhk")
|
||||
debug_color = Color(0.466667, 0.592157, 0, 0.419608)
|
||||
|
||||
[node name="RigidBody2D3" parent="." instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(256, 39)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("5_drh85")]
|
||||
position = Vector2(49, 305)
|
||||
|
||||
@@ -61,5 +106,21 @@ position = Vector2(49, 305)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("6_duuox")
|
||||
|
||||
[node name="crates" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBody2D3" parent="crates" instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(256, 39)
|
||||
|
||||
[node name="RigidBody2D" parent="crates" instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(297, 129)
|
||||
rotation = 0.688747
|
||||
|
||||
[node name="RigidBody2D2" parent="crates" instance=ExtResource("1_0wmww")]
|
||||
position = Vector2(391, 64)
|
||||
rotation = 0.358379
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||
tile_set = SubResource("TileSet_51dbi")
|
||||
|
||||
[connection signal="alert" from="Trigger" to="." method="_on_trigger_alert"]
|
||||
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
|
||||
@@ -1,9 +1,177 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c1cuiluq1fcpk"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://c1cuiluq1fcpk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_s1kdl"]
|
||||
[ext_resource type="Texture2D" uid="uid://cv2rxkxb3qt8d" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_h20by"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnya66cp8q1jw" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_fr7w2"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds0ii0prt3pij" path="res://assets/graphics/player/run/player run 48x48.png" id="3_gom75"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_y4y41"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mww1u"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ok4l7"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tusxt"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gdc6u"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_235hx"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cy5k4"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g3wxi"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aec4t"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3ht28"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5ntut"]
|
||||
atlas = ExtResource("2_h20by")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8hdk6"]
|
||||
atlas = ExtResource("3_fr7w2")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4ddi8"]
|
||||
atlas = ExtResource("3_fr7w2")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ndifq"]
|
||||
atlas = ExtResource("3_fr7w2")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0rpev"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w0u7q"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_csrrm"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n4feg"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eje62"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5yqty"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s7y8g"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kg71y"]
|
||||
atlas = ExtResource("3_gom75")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_gcr48"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mww1u")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ok4l7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tusxt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gdc6u")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_235hx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cy5k4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g3wxi")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aec4t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3ht28")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5ntut")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8hdk6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4ddi8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ndifq")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 6.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0rpev")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w0u7q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_csrrm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_n4feg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eje62")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5yqty")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s7y8g")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kg71y")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
|
||||
script = ExtResource("1_s1kdl")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -13,14 +181,24 @@ shape = SubResource("CircleShape2D_y4y41")
|
||||
debug_color = Color(0.752941, 0.211765, 0.984314, 0.419608)
|
||||
|
||||
[node name="RightRay" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(15, 0)
|
||||
target_position = Vector2(20, 0)
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="LeftRay" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-15, 0)
|
||||
target_position = Vector2(-21, 0)
|
||||
|
||||
[node name="RightTarget" type="Node2D" parent="."]
|
||||
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_gcr48")
|
||||
animation = &"jump"
|
||||
autoplay = "jump"
|
||||
frame = 2
|
||||
frame_progress = 1.0
|
||||
Reference in new issue
Block a user