added state handling, animation, camera; changed resolution
This commit is contained in:
1 parent
c5b67bc07c
commit
14146a476d
4 files changed
+100
-32
No files matched your search
+3
-1
@@ -20,8 +20,10 @@ script = ExtResource("2_iywne")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("3_lnu2h")]
|
||||
position = Vector2(84, 58)
|
||||
BUMP_POWER = 50
|
||||
BUMP_POWER = null
|
||||
SHOVE_POWER = 400
|
||||
ACCELERATION = 10
|
||||
HARD_GRAVITY = 2
|
||||
|
||||
[node name="Block" type="StaticBody2D" parent="."]
|
||||
position = Vector2(136, 339)
|
||||
|
||||
+19
-19
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://d3y1iqmpknpyo"]
|
||||
[gd_scene load_steps=27 format=3 uid="uid://d3y1iqmpknpyo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d3hp5rjoph7hg" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/player_idle/Player Idle 48x48.png" id="2_g2els"]
|
||||
@@ -9,6 +9,10 @@
|
||||
radius = 6.0
|
||||
height = 32.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
|
||||
atlas = ExtResource("3_dqkch")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@@ -53,14 +57,6 @@ region = Rect2(432, 0, 48, 48)
|
||||
atlas = ExtResource("3_dqkch")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
|
||||
atlas = ExtResource("3_dqkch")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
|
||||
atlas = ExtResource("3_dqkch")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
|
||||
atlas = ExtResource("4_qlg0r")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@@ -97,6 +93,14 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oprun")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"fall",
|
||||
"speed": 15.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qhqgy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@@ -133,14 +137,8 @@ animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jej6c")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_f1ej7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oprun")
|
||||
}],
|
||||
"loop": false,
|
||||
"loop": true,
|
||||
"name": &"jump",
|
||||
"speed": 15.0
|
||||
}, {
|
||||
@@ -195,8 +193,10 @@ position = Vector2(10, -4)
|
||||
[node name="LeftSpawn" type="Marker2D" parent="."]
|
||||
position = Vector2(-10, -4)
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_3vyb7")
|
||||
animation = &"run"
|
||||
animation = &"jump"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.6462772
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position_smoothing_enabled = true
|
||||
Reference in new issue
Block a user