summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/definitions/actor/Shadow.tres20
-rw-r--r--assets/sprites/HealthBar2.pngbin0 -> 210 bytes
-rw-r--r--assets/sprites/HealthBar2.png.import34
-rw-r--r--assets/sprites/HealthBarOverlay2.pngbin0 -> 249 bytes
-rw-r--r--assets/sprites/HealthBarOverlay2.png.import34
-rw-r--r--assets/sprites/HealthBarUnder2.pngbin0 -> 215 bytes
-rw-r--r--assets/sprites/HealthBarUnder2.png.import34
-rw-r--r--project.godot6
-rw-r--r--scenes/Game.tscn2
-rw-r--r--scenes/ui.tscn32
-rw-r--r--scripts/UI.cs4
-rw-r--r--scripts/map/DungeonGenerator.cs3
12 files changed, 152 insertions, 17 deletions
diff --git a/assets/definitions/actor/Shadow.tres b/assets/definitions/actor/Shadow.tres
new file mode 100644
index 0000000..5f5e326
--- /dev/null
+++ b/assets/definitions/actor/Shadow.tres
@@ -0,0 +1,20 @@
+[gd_resource type="Resource" script_class="EnemyDefinition" load_steps=4 format=3 uid="uid://dqd714474t4ic"]
+
+[ext_resource type="Texture2D" uid="uid://w0808ug4al66" path="res://assets/sprites/generic_grave.png" id="1_3bs08"]
+[ext_resource type="Script" uid="uid://dkfdm2m2scyks" path="res://scripts/actors/EnemyDefinition.cs" id="1_4jpld"]
+[ext_resource type="Texture2D" uid="uid://br8cqtbd6xcej" path="res://assets/sprites/EyeThingIdk.png" id="3_kvxyn"]
+
+[resource]
+script = ExtResource("1_4jpld")
+AI = 1
+name = "Shadow"
+texture = ExtResource("3_kvxyn")
+deathTexture = ExtResource("1_3bs08")
+blocksMovement = true
+Speed = 10
+Hp = 15
+Mp = 23
+Atk = 5
+Def = 2
+Men = 8
+metadata/_custom_type_script = "uid://dkfdm2m2scyks"
diff --git a/assets/sprites/HealthBar2.png b/assets/sprites/HealthBar2.png
new file mode 100644
index 0000000..1683f14
--- /dev/null
+++ b/assets/sprites/HealthBar2.png
Binary files differ
diff --git a/assets/sprites/HealthBar2.png.import b/assets/sprites/HealthBar2.png.import
new file mode 100644
index 0000000..d056de8
--- /dev/null
+++ b/assets/sprites/HealthBar2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://y3pw6113pf7l"
+path="res://.godot/imported/HealthBar2.png-e04fbd4c6273b62d1440236a23b39422.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/sprites/HealthBar2.png"
+dest_files=["res://.godot/imported/HealthBar2.png-e04fbd4c6273b62d1440236a23b39422.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/assets/sprites/HealthBarOverlay2.png b/assets/sprites/HealthBarOverlay2.png
new file mode 100644
index 0000000..a91672a
--- /dev/null
+++ b/assets/sprites/HealthBarOverlay2.png
Binary files differ
diff --git a/assets/sprites/HealthBarOverlay2.png.import b/assets/sprites/HealthBarOverlay2.png.import
new file mode 100644
index 0000000..297c169
--- /dev/null
+++ b/assets/sprites/HealthBarOverlay2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dlgtaxucc6cq8"
+path="res://.godot/imported/HealthBarOverlay2.png-e3892e9f99748e6a8c7b5a2c55508746.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/sprites/HealthBarOverlay2.png"
+dest_files=["res://.godot/imported/HealthBarOverlay2.png-e3892e9f99748e6a8c7b5a2c55508746.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/assets/sprites/HealthBarUnder2.png b/assets/sprites/HealthBarUnder2.png
new file mode 100644
index 0000000..7567a9c
--- /dev/null
+++ b/assets/sprites/HealthBarUnder2.png
Binary files differ
diff --git a/assets/sprites/HealthBarUnder2.png.import b/assets/sprites/HealthBarUnder2.png.import
new file mode 100644
index 0000000..09f77fe
--- /dev/null
+++ b/assets/sprites/HealthBarUnder2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dsqdxdtldmpnq"
+path="res://.godot/imported/HealthBarUnder2.png-67337de01d196e6fab820073dd201330.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/sprites/HealthBarUnder2.png"
+dest_files=["res://.godot/imported/HealthBarUnder2.png-67337de01d196e6fab820073dd201330.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/project.godot b/project.godot
index 6e989d1..ad05970 100644
--- a/project.godot
+++ b/project.godot
@@ -16,6 +16,12 @@ run/main_scene="uid://u5h6iqyi8wd0"
config/features=PackedStringArray("4.4", "C#", "Forward Plus")
config/icon="res://icon.svg"
+[display]
+
+window/size/viewport_width=320
+window/size/viewport_height=180
+window/stretch/mode="canvas_items"
+
[dotnet]
project/assembly_name="projeto-fantasia"
diff --git a/scenes/Game.tscn b/scenes/Game.tscn
index 6f80e11..d967ecb 100644
--- a/scenes/Game.tscn
+++ b/scenes/Game.tscn
@@ -31,6 +31,6 @@ script = ExtResource("5_s0nni")
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(8, 8)
-zoom = Vector2(2, 2)
+zoom = Vector2(0.5, 0.5)
[node name="UI" parent="." instance=ExtResource("6_aug50")]
diff --git a/scenes/ui.tscn b/scenes/ui.tscn
index a79ddba..d387a16 100644
--- a/scenes/ui.tscn
+++ b/scenes/ui.tscn
@@ -1,32 +1,38 @@
[gd_scene load_steps=8 format=3 uid="uid://b4h4xyr1g8o50"]
[ext_resource type="Script" uid="uid://br7w3abe0boqb" path="res://scripts/UI.cs" id="1_gdt2y"]
-[ext_resource type="Texture2D" uid="uid://cbqd3s1065am6" path="res://assets/sprites/inter-face/HP/HealthBarUnder2.png" id="2_p7vwb"]
-[ext_resource type="Texture2D" uid="uid://c1cktg2arnphx" path="res://assets/sprites/inter-face/HP/HealthBarOverlay2.png" id="3_ktti3"]
+[ext_resource type="Texture2D" uid="uid://dsqdxdtldmpnq" path="res://assets/sprites/HealthBarUnder2.png" id="2_p7vwb"]
+[ext_resource type="Texture2D" uid="uid://dlgtaxucc6cq8" path="res://assets/sprites/HealthBarOverlay2.png" id="3_ktti3"]
[ext_resource type="Texture2D" uid="uid://sgqb6ccdbt4h" path="res://assets/sprites/inter-face/MP/ManaBarUnder2.png" id="4_8dubc"]
-[ext_resource type="Texture2D" uid="uid://do06pptudsqdp" path="res://assets/sprites/inter-face/HP/HealthBar2.png" id="4_cgfq5"]
+[ext_resource type="Texture2D" uid="uid://y3pw6113pf7l" path="res://assets/sprites/HealthBar2.png" id="4_cgfq5"]
[ext_resource type="Texture2D" uid="uid://b2msd7khjxtat" path="res://assets/sprites/inter-face/MP/ManaBarOverlay.png" id="5_p7vwb"]
[ext_resource type="Texture2D" uid="uid://b1rotmrfynpau" path="res://assets/sprites/inter-face/MP/ManaBar.png" id="6_ktti3"]
-[node name="UI" type="Node2D"]
+[node name="UI" type="Node"]
script = ExtResource("1_gdt2y")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
-[node name="HPbar" type="TextureProgressBar" parent="CanvasLayer"]
-offset_right = 50.0
-offset_bottom = 10.0
-scale = Vector2(6, 6)
+[node name="MainContainer" type="HBoxContainer" parent="CanvasLayer"]
+anchors_preset = 12
+anchor_top = 1.0
+anchor_right = 1.0
+anchor_bottom = 1.0
+offset_top = -10.0
+grow_horizontal = 2
+grow_vertical = 0
+size_flags_horizontal = 0
+size_flags_vertical = 0
+
+[node name="HPbar" type="TextureProgressBar" parent="CanvasLayer/MainContainer"]
+layout_mode = 2
value = 100.0
texture_under = ExtResource("2_p7vwb")
texture_over = ExtResource("3_ktti3")
texture_progress = ExtResource("4_cgfq5")
-[node name="MPbar" type="TextureProgressBar" parent="CanvasLayer"]
-offset_top = 72.0
-offset_right = 50.0
-offset_bottom = 82.0
-scale = Vector2(6, 6)
+[node name="MPbar" type="TextureProgressBar" parent="CanvasLayer/MainContainer"]
+layout_mode = 2
value = 100.0
texture_under = ExtResource("4_8dubc")
texture_over = ExtResource("5_p7vwb")
diff --git a/scripts/UI.cs b/scripts/UI.cs
index fada956..781c14a 100644
--- a/scripts/UI.cs
+++ b/scripts/UI.cs
@@ -1,13 +1,13 @@
using Godot;
using System;
-public partial class UI : Node2D
+public partial class UI : Node
{
private TextureProgressBar hpBar;
public override void _Ready() {
base._Ready();
- hpBar = GetNode<TextureProgressBar>("CanvasLayer/HPbar");
+ hpBar = GetNode<TextureProgressBar>("CanvasLayer/MainContainer/HPbar");
}
public void OnHealthChanged(int hp, int maxHp) {
diff --git a/scripts/map/DungeonGenerator.cs b/scripts/map/DungeonGenerator.cs
index 5f319c4..6a159c9 100644
--- a/scripts/map/DungeonGenerator.cs
+++ b/scripts/map/DungeonGenerator.cs
@@ -11,7 +11,8 @@ public partial class DungeonGenerator : Node
/// </summary>
private static readonly Godot.Collections.Array<EnemyDefinition> enemies = [
GD.Load<EnemyDefinition>("res://assets/definitions/actor/Skeleton.tres"),
- GD.Load<EnemyDefinition>("res://assets/definitions/actor/morcegao.tres")
+ GD.Load<EnemyDefinition>("res://assets/definitions/actor/morcegao.tres"),
+ GD.Load<EnemyDefinition>("res://assets/definitions/actor/Shadow.tres")
];
/// <summary>