From 8fcb652f170aca16627854b8aa1c7eb24be8a358 Mon Sep 17 00:00:00 2001 From: Luna Brovchuk Date: Mon, 2 Oct 2023 17:42:26 +0200 Subject: [PATCH] Minor Fix --- res/themes/default.tres | 1 - src/models/enemies/bat/Bat.tscn | 1 + src/scenes/game/Game.tscn | 21 +++++++++------------ src/scripts/enemy_class.gd | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/res/themes/default.tres b/res/themes/default.tres index 41f81a2..f806a20 100644 --- a/res/themes/default.tres +++ b/res/themes/default.tres @@ -3,7 +3,6 @@ [ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1] [sub_resource type="DynamicFont" id=1] -size = 8 font_data = ExtResource( 1 ) [resource] diff --git a/src/models/enemies/bat/Bat.tscn b/src/models/enemies/bat/Bat.tscn index 22968bf..24db929 100644 --- a/src/models/enemies/bat/Bat.tscn +++ b/src/models/enemies/bat/Bat.tscn @@ -22,6 +22,7 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" +frame = 1 playing = true centered = false diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index b13a039..4a47aea 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=31 format=2] +[gd_scene load_steps=30 format=2] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1] [ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] @@ -7,7 +7,6 @@ [ext_resource path="res://src/models/player/Player.tscn" type="PackedScene" id=5] [ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=6] [ext_resource path="res://src/scenes/game/sprites/cast_time.png" type="Texture" id=7] -[ext_resource path="res://src/scenes/game/sprites/damage.png" type="Texture" id=8] [ext_resource path="res://src/scenes/game/card_placeholder.gd" type="Script" id=8] [ext_resource path="res://src/scenes/game/sprites/player_icon.png" type="Texture" id=10] [ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11] @@ -30,14 +29,14 @@ extents = Vector2( 140, 10.125 ) atlas = ExtResource( 6 ) region = Rect2( 155, 0, 31, 11 ) -[sub_resource type="AtlasTexture" id=9] -atlas = ExtResource( 6 ) -region = Rect2( 93, 0, 31, 11 ) - [sub_resource type="AtlasTexture" id=8] atlas = ExtResource( 6 ) region = Rect2( 124, 0, 31, 11 ) +[sub_resource type="AtlasTexture" id=9] +atlas = ExtResource( 6 ) +region = Rect2( 93, 0, 31, 11 ) + [sub_resource type="AtlasTexture" id=10] atlas = ExtResource( 6 ) region = Rect2( 62, 0, 31, 11 ) @@ -52,10 +51,10 @@ region = Rect2( 0, 0, 31, 11 ) [sub_resource type="SpriteFrames" id=4] animations = [ { -"frames": [ SubResource( 7 ), SubResource( 9 ), SubResource( 8 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], -"loop": false, -"name": "idle", -"speed": 0.0 +"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], +"loop": true, +"name": "default", +"speed": 5.0 } ] [sub_resource type="Animation" id=5] @@ -219,7 +218,6 @@ margin_bottom = 40.0 [node name="HealthSprite" type="AnimatedSprite" parent="UIWrapper/UI/Left/Health"] position = Vector2( 52, 156 ) frames = SubResource( 4 ) -animation = "idle" centered = false [node name="PlayerIcon" type="Sprite" parent="UIWrapper/UI/Left"] @@ -280,7 +278,6 @@ margin_bottom = 40.0 [node name="Damage" type="Sprite" parent="UIWrapper/UI/Right/Damage"] position = Vector2( 256, 160 ) -texture = ExtResource( 8 ) [node name="Cards" type="Control" parent="UIWrapper/UI"] visible = false diff --git a/src/scripts/enemy_class.gd b/src/scripts/enemy_class.gd index 9b65828..ab81859 100644 --- a/src/scripts/enemy_class.gd +++ b/src/scripts/enemy_class.gd @@ -1,7 +1,7 @@ extends KinematicBody2D onready var player = $"../../Player" -var empty_material = load("res://res/shaders/empty_material.tscn") +var empty_material = load("res://res/shaders/empty_material.tres") var hp var dead = false var dead_timer = .0