173 lines
4.6 KiB
Plaintext
173 lines
4.6 KiB
Plaintext
[gd_scene load_steps=19 format=2]
|
|
|
|
[ext_resource path="res://assets/img/spaced-dungeon-tileset.png" type="Texture" id=1]
|
|
[ext_resource path="res://assets/theme.tres" type="Theme" id=2]
|
|
[ext_resource path="res://objects/bar.tscn" type="PackedScene" id=3]
|
|
[ext_resource path="res://assets/ui/hp_bar_bg.tres" type="StyleBox" id=4]
|
|
[ext_resource path="res://assets/ui/hp_bar_fg.tres" type="StyleBox" id=5]
|
|
[ext_resource path="res://assets/ui/mana_bar_fg.tres" type="StyleBox" id=6]
|
|
[ext_resource path="res://assets/ui/mana_bar_bg.tres" type="StyleBox" id=7]
|
|
[ext_resource path="res://scripts/objects/player.gd" type="Script" id=10]
|
|
|
|
[sub_resource type="AtlasTexture" id=1]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 0, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=2]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 18, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=3]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 36, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=4]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 54, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=5]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 72, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=6]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 90, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=7]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 108, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=8]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 126, 468, 18, 36 )
|
|
|
|
[sub_resource type="AtlasTexture" id=9]
|
|
atlas = ExtResource( 1 )
|
|
region = Rect2( 144, 468, 18, 36 )
|
|
|
|
[sub_resource type="SpriteFrames" id=10]
|
|
animations = [ {
|
|
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
|
|
"loop": true,
|
|
"name": "idle",
|
|
"speed": 6.0
|
|
}, {
|
|
"frames": [ SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
|
|
"loop": true,
|
|
"name": "run",
|
|
"speed": 12.0
|
|
}, {
|
|
"frames": [ SubResource( 9 ) ],
|
|
"loop": true,
|
|
"name": "hurt",
|
|
"speed": 5.0
|
|
} ]
|
|
|
|
[node name="player" type="KinematicBody2D" groups=["destructable"]]
|
|
script = ExtResource( 10 )
|
|
sprite = NodePath("sprite")
|
|
collider = NodePath("collider")
|
|
name_label = NodePath("ui/player_name")
|
|
health_bar = NodePath("ui/c2/bars/health_bar")
|
|
mana_bar = NodePath("ui/c2/bars/mana_bar")
|
|
aim_indicator = NodePath("collider/aim_indicator")
|
|
tile_indicator = NodePath("collider/tile_indicator")
|
|
|
|
[node name="sprite" type="AnimatedSprite" parent="."]
|
|
modulate = Color( 0.384314, 0.796078, 1, 1 )
|
|
position = Vector2( 0, -48 )
|
|
scale = Vector2( 4, 4 )
|
|
frames = SubResource( 10 )
|
|
animation = "idle"
|
|
frame = 3
|
|
playing = true
|
|
|
|
[node name="collider" type="CollisionPolygon2D" parent="."]
|
|
scale = Vector2( 4, 4 )
|
|
polygon = PoolVector2Array( 6, -1, 6, 1, 1, 6, -1, 6, -6, 1, -6, -1, -1, -6, 1, -6 )
|
|
|
|
[node name="aim_indicator" type="Sprite" parent="collider"]
|
|
modulate = Color( 1, 1, 1, 0.25098 )
|
|
texture = ExtResource( 1 )
|
|
offset = Vector2( 0, 16 )
|
|
region_enabled = true
|
|
region_rect = Rect2( 163, 487, 4, 7 )
|
|
|
|
[node name="tile_indicator" type="Sprite" parent="collider"]
|
|
modulate = Color( 1, 1, 1, 0.25098 )
|
|
scale = Vector2( 2, 2 )
|
|
texture = ExtResource( 1 )
|
|
region_enabled = true
|
|
region_rect = Rect2( 0, 72, 16, 16 )
|
|
|
|
[node name="ui" type="VBoxContainer" parent="."]
|
|
modulate = Color( 1, 1, 1, 0.498039 )
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -59.0
|
|
margin_top = -116.0
|
|
margin_right = 61.0
|
|
margin_bottom = 55.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="c2" type="CenterContainer" parent="ui"]
|
|
margin_right = 120.0
|
|
margin_bottom = 44.0
|
|
size_flags_vertical = 0
|
|
|
|
[node name="bars" type="VBoxContainer" parent="ui/c2"]
|
|
margin_right = 120.0
|
|
margin_bottom = 44.0
|
|
rect_min_size = Vector2( 120, 44 )
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 0
|
|
custom_constants/separation = 4
|
|
alignment = 1
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="health_bar" parent="ui/c2/bars" instance=ExtResource( 3 )]
|
|
anchor_right = 0.0
|
|
anchor_bottom = 0.0
|
|
margin_right = 120.0
|
|
margin_bottom = 20.0
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
theme = ExtResource( 2 )
|
|
custom_styles/fg = ExtResource( 5 )
|
|
custom_styles/bg = ExtResource( 4 )
|
|
|
|
[node name="mana_bar" parent="ui/c2/bars" instance=ExtResource( 3 )]
|
|
anchor_right = 0.0
|
|
anchor_bottom = 0.0
|
|
margin_top = 24.0
|
|
margin_right = 120.0
|
|
margin_bottom = 44.0
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
theme = ExtResource( 2 )
|
|
custom_styles/fg = ExtResource( 6 )
|
|
custom_styles/bg = ExtResource( 7 )
|
|
max_value = 1000.0
|
|
value = 600.0
|
|
|
|
[node name="player_name" type="Label" parent="ui"]
|
|
margin_top = 48.0
|
|
margin_right = 120.0
|
|
margin_bottom = 171.0
|
|
size_flags_horizontal = 7
|
|
size_flags_vertical = 7
|
|
text = "player_name"
|
|
align = 1
|
|
valign = 2
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|