Assets and player
This commit is contained in:
21
scenes/game.tscn
Normal file
21
scenes/game.tscn
Normal file
@ -0,0 +1,21 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ddx678te8glnm"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cxdkngh6fo5p7" path="res://scenes/player.tscn" id="1_866nb"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_4tes5"]
|
||||
distance = -12.7355
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_866nb")]
|
||||
position = Vector2(1, 0)
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position = Vector2(3, -37)
|
||||
zoom = Vector2(4, 4)
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
position = Vector2(3, 30)
|
||||
shape = SubResource("WorldBoundaryShape2D_4tes5")
|
57
scenes/player.tscn
Normal file
57
scenes/player.tscn
Normal file
@ -0,0 +1,57 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cxdkngh6fo5p7"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_btp1f"]
|
||||
[ext_resource type="Texture2D" uid="uid://bebck3y4sy2c8" path="res://assets/sprites/knight.png" id="1_uiil0"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v1bjp"]
|
||||
atlas = ExtResource("1_uiil0")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b0pa1"]
|
||||
atlas = ExtResource("1_uiil0")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_go8pl"]
|
||||
atlas = ExtResource("1_uiil0")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1qkdf"]
|
||||
atlas = ExtResource("1_uiil0")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_j6wpo"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v1bjp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b0pa1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_go8pl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1qkdf")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_lh46r"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
script = ExtResource("1_btp1f")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, -12)
|
||||
sprite_frames = SubResource("SpriteFrames_j6wpo")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.161906
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -6)
|
||||
shape = SubResource("CircleShape2D_lh46r")
|
Reference in New Issue
Block a user