Added player character and initial interaction functionality
This commit is contained in:
49
scene/player.tscn
Normal file
49
scene/player.tscn
Normal file
@@ -0,0 +1,49 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dkvcye4mhvshd"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_j0htm"]
|
||||
[ext_resource type="Texture2D" uid="uid://n806c03hgaq1" path="res://assets/scifi_tilesheet@2.png" id="1_vqdy1"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8yvc7"]
|
||||
atlas = ExtResource("1_vqdy1")
|
||||
region = Rect2(640, 192, 64, 64)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jav3v"]
|
||||
size = Vector2(40, 45)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_47lv4"]
|
||||
resource_name = "walk"
|
||||
length = 1.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2, 0.4, 0.6, 0.8, 1, 1.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0, -1), Vector2(0, -2), Vector2(0, -1), Vector2(0, 0), Vector2(0, 1), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ditnu"]
|
||||
_data = {
|
||||
"walk": SubResource("Animation_47lv4")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_j0htm")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = SubResource("AtlasTexture_8yvc7")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_jav3v")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ditnu")
|
||||
}
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
Reference in New Issue
Block a user