Update player animations, speed, and camera smoothing
This commit is contained in:
parent
7d39562d1c
commit
1ceb8cd3dc
50
player.tscn
50
player.tscn
|
@ -1,13 +1,23 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://tpe1cb4ucx0b"]
|
[gd_scene load_steps=15 format=3 uid="uid://tpe1cb4ucx0b"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b8l378t64365q" path="res://playerSprite.png" id="1_4flbx"]
|
[ext_resource type="Texture2D" uid="uid://b8l378t64365q" path="res://playerSprite.png" id="1_4flbx"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cgls65agualgs" path="res://playerSprites/playerSprite_0001.png" id="2_nvl01"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bmh0heje40ykd" path="res://playerSprites/playerSprite_0002.png" id="3_ivps1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bao85imrx0f03" path="res://playerSprites/playerSprite_0003.png" id="4_urp6f"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c6cl0gxxi0qit" path="res://playerSprites/playerSprite_0004.png" id="5_bwjto"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b17ier27c0rl3" path="res://playerSprites/playerSprite_0005.png" id="6_606se"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://conrfwtlx2efh" path="res://playerSprites/playerSprite_0006.png" id="7_u1c27"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dr02wvaqua2bn" path="res://playerSprites/playerSprite_0007.png" id="8_op7ga"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d6fs7c2vhkrp" path="res://playerSprites/playerSprite_0008.png" id="9_q13i1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://drob7tjjr8w2g" path="res://playerSprites/playerSprite_0009.png" id="10_pylmc"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c4aoelxphmcvo" path="res://playerSprites/playerSprite_0010.png" id="11_pbfsw"]
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_4flbx"]
|
[sub_resource type="GDScript" id="GDScript_4flbx"]
|
||||||
resource_name = "movementScript"
|
resource_name = "movementScript"
|
||||||
script/source = "extends CharacterBody2D
|
script/source = "extends CharacterBody2D
|
||||||
|
|
||||||
|
|
||||||
const SPEED = 10.0
|
const SPEED = 3.0
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
|
@ -22,10 +32,40 @@ animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("1_4flbx")
|
"texture": ExtResource("1_4flbx")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("2_nvl01")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("3_ivps1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("4_urp6f")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("5_bwjto")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("6_606se")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("7_u1c27")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("8_op7ga")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("9_q13i1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("10_pylmc")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("11_pbfsw")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"default",
|
"name": &"default",
|
||||||
"speed": 5.0
|
"speed": 10.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3pqv"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3pqv"]
|
||||||
|
@ -37,8 +77,12 @@ script = SubResource("GDScript_4flbx")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
sprite_frames = SubResource("SpriteFrames_onrkg")
|
sprite_frames = SubResource("SpriteFrames_onrkg")
|
||||||
|
autoplay = "default"
|
||||||
|
frame_progress = 0.796774
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("RectangleShape2D_i3pqv")
|
shape = SubResource("RectangleShape2D_i3pqv")
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
position_smoothing_enabled = true
|
||||||
|
position_smoothing_speed = 10.0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=3 format=4 uid="uid://ccjb75bercbw8"]
|
[gd_scene load_steps=3 format=4 uid="uid://ccjb75bercbw8"]
|
||||||
|
|
||||||
[ext_resource type="TileSet" uid="uid://xnedi1edel2b" path="res://tileMaps/baseTileset.tres" id="1_a7uaa"]
|
[ext_resource type="TileSet" uid="uid://xnedi1edel2b" path="res://tileMaps/baseTileset.tres" id="1_a7uaa"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c1xy5bf2p6vmh" path="res://player.tscn" id="2_lsvd3"]
|
[ext_resource type="PackedScene" uid="uid://tpe1cb4ucx0b" path="res://player.tscn" id="2_lsvd3"]
|
||||||
|
|
||||||
[node name="Node2D" type="Node2D"]
|
[node name="Node2D" type="Node2D"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user