diff --git a/Autoloads/FloatingTextManager.cs b/Autoloads/FloatingTextManager.cs index 43ed60f..5db0bb9 100644 --- a/Autoloads/FloatingTextManager.cs +++ b/Autoloads/FloatingTextManager.cs @@ -9,9 +9,9 @@ public partial class FloatingTextManager : Node [Export] public PackedScene FloatingTextScene { get; set; } [ExportGroup("Colors")] - [Export] public Color DamageColor { get; set; } = new Color("#ff4b4b"); // Red - [Export] public Color HealColor { get; set; } = new Color("#4bff65"); // Green - [Export] public Color CoinColor { get; set; } = new Color("#ffd700"); // Gold + [Export] public Color DamageColor { get; set; } = new Color("#b21030"); // Red + [Export] public Color HealColor { get; set; } = new Color("#71f341"); // Green + [Export] public Color CoinColor { get; set; } = new Color("#ebd320"); // Gold [Export] public Color MessageColor { get; set; } = new Color("#ffffff"); // White public void ShowDamage(float amount, Vector2 position) diff --git a/objects/entities/basic_enemy.tscn b/objects/entities/basic_enemy.tscn index dd39358..7e4dc71 100644 --- a/objects/entities/basic_enemy.tscn +++ b/objects/entities/basic_enemy.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=25 format=3 uid="uid://bockkmyn8il4c"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="1_hh6y0"] -[ext_resource type="Texture2D" uid="uid://cu72810eyk4dx" path="res://sprites/enemy-robot.png" id="2_os2h8"] +[ext_resource type="Texture2D" uid="uid://duxx56wxmjoxd" path="res://sprites/basic_enemy.png" id="2_laaj3"] [ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="3_n6phc"] [ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="4_t0yic"] [ext_resource type="Script" uid="uid://d2hrr8fruho1d" path="res://scripts/components/SideToSideMovementComponent.cs" id="5_h333r"] @@ -68,7 +68,7 @@ shape = SubResource("RectangleShape2D_pwwji") [node name="Sprite2D" type="Sprite2D" parent="."] material = SubResource("ShaderMaterial_j18j0") -texture = ExtResource("2_os2h8") +texture = ExtResource("2_laaj3") [node name="right bullet spawn" type="Node2D" parent="Sprite2D"] position = Vector2(16, 7) @@ -149,7 +149,7 @@ FireFX = NodePath("../FireFX") [node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("ComponentsToDisable", "StatusEffectComponent", "IceFx")] script = ExtResource("13_kga14") -ComponentsToDisable = [NodePath("../SideToSideMovement"), NodePath(""), NodePath("../DamageComponent")] +ComponentsToDisable = [NodePath("../SideToSideMovement"), null, NodePath("../DamageComponent")] StatusEffectComponent = NodePath("../StatusEffectComponent") IceFx = NodePath("../Ice FX") diff --git a/scripts/components/LeverComponent.cs b/scripts/components/LeverComponent.cs index db10217..67e7e70 100644 --- a/scripts/components/LeverComponent.cs +++ b/scripts/components/LeverComponent.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Godot; +using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.components; @@ -14,9 +15,13 @@ public partial class LeverComponent : Node [Signal] public delegate void ActivatedEventHandler(); + + private FloatingTextManager _floatingTextManager; public override void _Ready() { + _floatingTextManager = GetNode("/root/FloatingTextManager"); + if (Area == null) { GD.PushError("LeverComponent: Area is not set."); @@ -46,6 +51,7 @@ public partial class LeverComponent : Node private async Task Activate() { EmitSignalActivated(); + _floatingTextManager?.ShowMessage("Activated!", ((Node2D)Owner).GlobalPosition); Sfx?.Play(); Sprite.Frame = StartAnimationIndex + 1; var timer = GetTree().CreateTimer(AnimationDuration); diff --git a/sprites/basic_enemy.png b/sprites/basic_enemy.png new file mode 100644 index 0000000..d980fc9 Binary files /dev/null and b/sprites/basic_enemy.png differ diff --git a/sprites/basic_enemy.png.import b/sprites/basic_enemy.png.import new file mode 100644 index 0000000..c076983 --- /dev/null +++ b/sprites/basic_enemy.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://duxx56wxmjoxd" +path="res://.godot/imported/basic_enemy.png-32481431dc8a0eb348a787c386b68288.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/basic_enemy.png" +dest_files=["res://.godot/imported/basic_enemy.png-32481431dc8a0eb348a787c386b68288.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