diff --git a/Classes/Notes/Note.cs b/Classes/Notes/Note.cs index f382b128..cc6fed18 100644 --- a/Classes/Notes/Note.cs +++ b/Classes/Notes/Note.cs @@ -6,16 +6,16 @@ * @class Note * @brief Data structure class for holding data and methods for a battle time note. WIP */ -public partial class Note : Resource +public partial class Note : Resource, IDisplayable { public PuppetTemplate Owner; - public string Name; + public string Name { get; set; } private int _baseVal; public float CostModifier { get; private set; } private Action NoteEffect; //TODO: Where/How to deal with timing. - public string Tooltip; - public Texture2D Texture; + public string Tooltip { get; set; } + public Texture2D Texture { get; set; } public Note( string name, diff --git a/Classes/Relics/RelicTemplate.cs b/Classes/Relics/RelicTemplate.cs index f0a117cc..da8daba4 100644 --- a/Classes/Relics/RelicTemplate.cs +++ b/Classes/Relics/RelicTemplate.cs @@ -2,13 +2,13 @@ using FunkEngine; using Godot; -public partial class RelicTemplate : Resource +public partial class RelicTemplate : Resource, IDisplayable { public RelicEffect[] Effects; - public string Name; + public string Name { get; set; } - public Texture2D Texture; - public string Tooltip; + public Texture2D Texture { get; set; } + public string Tooltip { get; set; } public RelicTemplate( string name = "", diff --git a/Classes/Relics/assets/Auroboros.png b/Classes/Relics/assets/Auroboros.png new file mode 100644 index 00000000..b264c935 Binary files /dev/null and b/Classes/Relics/assets/Auroboros.png differ diff --git a/Classes/Relics/assets/Auroboros.png.import b/Classes/Relics/assets/Auroboros.png.import new file mode 100644 index 00000000..d0051264 --- /dev/null +++ b/Classes/Relics/assets/Auroboros.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqlrv1vra4mbn" +path="res://.godot/imported/Auroboros.png-27bfe2114f3955a0f6ef5ceb4e65adbf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/assets/Auroboros.png" +dest_files=["res://.godot/imported/Auroboros.png-27bfe2114f3955a0f6ef5ceb4e65adbf.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/Classes/Relics/assets/Colorboros.png b/Classes/Relics/assets/Colorboros.png new file mode 100644 index 00000000..2303779b Binary files /dev/null and b/Classes/Relics/assets/Colorboros.png differ diff --git a/Classes/Relics/assets/Colorboros.png.import b/Classes/Relics/assets/Colorboros.png.import new file mode 100644 index 00000000..81d7b2ea --- /dev/null +++ b/Classes/Relics/assets/Colorboros.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccd6pskxcwpxg" +path="res://.godot/imported/Colorboros.png-56197d792c620150c773fb4ecce6289c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/assets/Colorboros.png" +dest_files=["res://.godot/imported/Colorboros.png-56197d792c620150c773fb4ecce6289c.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/Globals/FunkEngineNameSpace.cs b/Globals/FunkEngineNameSpace.cs index 9aa475ae..04c05161 100644 --- a/Globals/FunkEngineNameSpace.cs +++ b/Globals/FunkEngineNameSpace.cs @@ -50,6 +50,7 @@ public enum BattleEffectTrigger NoteHit, SelfNoteHit, OnPickup, + OnLoop, } public enum Stages @@ -191,3 +192,10 @@ public interface IBattleEvent void OnTrigger(BattleDirector BD); BattleEffectTrigger GetTrigger(); } + +public interface IDisplayable +{ + string Name { get; set; } + string Tooltip { get; set; } + Texture2D Texture { get; set; } +} diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index b6705983..376350d8 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -103,7 +103,7 @@ public partial class Scribe : Node ), new RelicTemplate( "Good Vibes", - "Good vibes, heals the player whenever they place a note.", //TODO: Description can include the relics values? + "Heals the player whenever they place a note.", GD.Load("res://Classes/Relics/assets/relic_GoodVibes.png"), new RelicEffect[] { @@ -117,6 +117,38 @@ public partial class Scribe : Node ), } ), + new RelicTemplate( + "Auroboros", + "Bigger number, better person. Increases combo multiplier every riff.", + GD.Load("res://Classes/Relics/assets/Auroboros.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnLoop, + 1, + (director, val) => + { + director.NotePlacementBar.IncreaseBonusMult(val); + } + ), + } + ), + new RelicTemplate( + "Colorboros", + "Taste the rainbow. Charges the freestyle bar every riff.", + GD.Load("res://Classes/Relics/assets/Colorboros.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnLoop, + 20, + (director, val) => + { + director.NotePlacementBar.IncreaseCharge(val); + } + ), + } + ), }; //TODO: Item pool(s) @@ -124,7 +156,7 @@ public partial class Scribe : Node public static RelicTemplate[] GetRandomRelics(RelicTemplate[] ownedRelics, int count) { var availableRelics = Scribe - .RelicDictionary.Where(r => !ownedRelics.Any(o => o.Name == r.Name)) + .RelicDictionary.Where(r => ownedRelics.All(o => o.Name != r.Name)) .ToArray(); availableRelics = availableRelics @@ -139,4 +171,19 @@ public static RelicTemplate[] GetRandomRelics(RelicTemplate[] ownedRelics, int c } return availableRelics; } + + public static Note[] GetRandomRewardNotes(int count) + { + var availableNotes = Scribe + .NoteDictionary.Where(r => r.Name.Contains("Player")) //TODO: Classifications/pools + .ToArray(); + + availableNotes = availableNotes + .OrderBy(_ => StageProducer.GlobalRng.Randi()) + .Take(count) + .Select(r => r.Clone()) + .ToArray(); + + return availableNotes; + } } diff --git a/README.md b/README.md index 4888d942..3b6313f2 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ Current team members include: #### Attributions: First Song: gameMusic by Magntron - freesound.org -Input buttons by Nicolae (Xelu) Berbece \ No newline at end of file +Input buttons by Nicolae (Xelu) Berbece diff --git a/project.godot b/project.godot index 86d2eb12..53b7e2a2 100644 --- a/project.godot +++ b/project.godot @@ -34,7 +34,7 @@ project/assembly_name="Funk Engine" [game] -input_scheme="QWERT" +input_scheme="ARROWS" [input] diff --git a/scenes/BattleDirector/NotePlacementBar.tscn b/scenes/BattleDirector/NotePlacementBar.tscn index 008d7d01..b0935a83 100644 --- a/scenes/BattleDirector/NotePlacementBar.tscn +++ b/scenes/BattleDirector/NotePlacementBar.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://duhiilcv4tat3"] +[gd_scene load_steps=12 format=3 uid="uid://duhiilcv4tat3"] [ext_resource type="Script" path="res://scenes/BattleDirector/scripts/NotePlacementBar.cs" id="1_456es"] [ext_resource type="Texture2D" uid="uid://cnyr5usjdv0ni" path="res://scenes/BattleDirector/assets/temp_note_queue.png" id="2_3tw16"] @@ -23,7 +23,33 @@ width = 32 height = 98 fill_to = Vector2(0, 1) -[node name="NotePlacementBar" type="Control" node_paths=PackedStringArray("notePlacementBar", "currentComboMultText", "_currentNote", "_nextNote", "fullBarParticles")] +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fy2uu"] +lifetime_randomness = 0.32 +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(40, 5, 1) +inherit_velocity_ratio = 1.0 +direction = Vector3(0, 1, 0) +spread = 13.548 +initial_velocity_min = 124.08 +initial_velocity_max = 176.41 +gravity = Vector3(0, 98, 0) +scale_min = 2.0 +scale_max = 3.0 +turbulence_noise_strength = 0.1 +turbulence_noise_scale = 5.0 +turbulence_influence_min = 0.0 +turbulence_influence_max = 0.018 + +[sub_resource type="Gradient" id="Gradient_2uknl"] +offsets = PackedFloat32Array(0) +colors = PackedColorArray(0.46, 0.2162, 0.39905, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_d62c7"] +gradient = SubResource("Gradient_2uknl") +width = 1 + +[node name="NotePlacementBar" type="Control" node_paths=PackedStringArray("notePlacementBar", "currentComboMultText", "_particles", "_currentNote", "_nextNote", "fullBarParticles")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -33,6 +59,7 @@ grow_vertical = 2 script = ExtResource("1_456es") notePlacementBar = NodePath("ProgressBar") currentComboMultText = NodePath("TextEdit") +_particles = NodePath("ProgressBar/Rock") _currentNote = NodePath("NoteQueueSprite/NextNote") _nextNote = NodePath("NoteQueueSprite/CurrentNote") fullBarParticles = NodePath("ProgressBar/CPUParticles2D") @@ -48,6 +75,18 @@ texture_under = SubResource("GradientTexture2D_hhds4") texture_progress = SubResource("GradientTexture2D_0bqho") texture_progress_offset = Vector2(1, 1) +[node name="Rock" type="GPUParticles2D" parent="ProgressBar"] +z_index = 1 +position = Vector2(-1, -32) +emitting = false +amount = 22 +process_material = SubResource("ParticleProcessMaterial_fy2uu") +texture = SubResource("GradientTexture1D_d62c7") +lifetime = 2.0 +preprocess = 0.1 +explosiveness = 0.3 +randomness = 0.05 + [node name="CPUParticles2D" type="CPUParticles2D" parent="ProgressBar"] position = Vector2(14, 98) emitting = false @@ -63,6 +102,7 @@ color = Color(1, 1, 0.0745098, 1) [node name="TextEdit" type="TextEdit" parent="."] z_as_relative = false +custom_minimum_size = Vector2(80, 35) layout_mode = 0 offset_right = 80.0 offset_bottom = 35.0 diff --git a/scenes/BattleDirector/scripts/BattleDirector.cs b/scenes/BattleDirector/scripts/BattleDirector.cs index 1d18e178..95bde41d 100644 --- a/scenes/BattleDirector/scripts/BattleDirector.cs +++ b/scenes/BattleDirector/scripts/BattleDirector.cs @@ -20,7 +20,7 @@ public partial class BattleDirector : Node2D private ChartManager CM; [Export] - private NotePlacementBar NotePlacementBar; + public NotePlacementBar NotePlacementBar; [Export] private Conductor CD; @@ -29,6 +29,7 @@ public partial class BattleDirector : Node2D private AudioStreamPlayer Audio; private double _timingInterval = .1; //secs, maybe make somewhat note dependent + private double _lastBeat; private SongData _curSong; @@ -125,7 +126,11 @@ private void EndBattle() public override void _Process(double delta) { TimeKeeper.CurrentTime = Audio.GetPlaybackPosition(); - CD.CheckMiss(); + double realBeat = TimeKeeper.CurrentTime / (60 / (double)TimeKeeper.Bpm) % CM.BeatsPerLoop; + CD.CheckMiss(realBeat); + if (realBeat < _lastBeat) + ChartLooped?.Invoke(this); + _lastBeat = realBeat; } #endregion @@ -217,7 +222,10 @@ private void CheckBattleStatus(PuppetTemplate puppet) private void ShowRewardSelection(int amount) { - RewardSelect.CreateSelection(this, Player.Stats, amount).Selected += EndBattle; + string type = "Note"; + if (StageProducer.Config.RoomType == Stages.Boss) + type = "Relic"; + RewardSelect.CreateSelection(this, Player.Stats, amount, type).Selected += EndBattle; } #endregion @@ -227,6 +235,9 @@ private void ShowRewardSelection(int amount) private delegate void NotePlacedHandler(BattleDirector BD); private event NotePlacedHandler NotePlaced; + private delegate void ChartLoopHandler(BattleDirector BD); + private event ChartLoopHandler ChartLooped; + private void EventizeRelics() { foreach (var relic in Player.Stats.CurRelics) @@ -238,6 +249,9 @@ private void EventizeRelics() case BattleEffectTrigger.NotePlaced: NotePlaced += effect.OnTrigger; break; + case BattleEffectTrigger.OnLoop: + ChartLooped += effect.OnTrigger; + break; } } } diff --git a/scenes/BattleDirector/scripts/Conductor.cs b/scenes/BattleDirector/scripts/Conductor.cs index 55ce9f50..7c02677a 100644 --- a/scenes/BattleDirector/scripts/Conductor.cs +++ b/scenes/BattleDirector/scripts/Conductor.cs @@ -100,10 +100,9 @@ private void AddExampleNotes() } //Check all lanes for misses from missed inputs - public void CheckMiss() + public void CheckMiss(double realBeat) { //On current beat, if prev beat is active and not inputted - double realBeat = TimeKeeper.CurrentTime / (60 / (double)TimeKeeper.Bpm) % CM.BeatsPerLoop; for (int i = 0; i < _laneData.Length; i++) { if ( diff --git a/scenes/BattleDirector/scripts/NotePlacementBar.cs b/scenes/BattleDirector/scripts/NotePlacementBar.cs index 2d0a1f84..ab300962 100644 --- a/scenes/BattleDirector/scripts/NotePlacementBar.cs +++ b/scenes/BattleDirector/scripts/NotePlacementBar.cs @@ -9,6 +9,7 @@ public partial class NotePlacementBar : Node private int _currentBarValue; private int _currentCombo; int comboMult; + int bonusMult; int notesToIncreaseCombo; [Export] @@ -17,6 +18,9 @@ public partial class NotePlacementBar : Node [Export] TextEdit currentComboMultText; + [Export] + private GpuParticles2D _particles; + [Export] private Sprite2D _currentNote; private Note _currentNoteInstance; @@ -30,6 +34,35 @@ public partial class NotePlacementBar : Node private Note[] _noteDeck; private Queue _noteQueue = new Queue(); + //Juice - https://www.youtube.com/watch?v=LGt-jjVf-ZU + private int _limiter; + private Vector2 _barInitPosition; + private float _randomStrength = 1f; + private float _shakeFade = 10f; + private RandomNumberGenerator _rng = new(); + private float _shakeStrength; + + private void ProcessShake(double delta) + { + _limiter = (_limiter + 1) % 3; + if (_limiter != 1) + return; + if (_currentBarValue >= MaxValue) + { + _shakeStrength = _randomStrength; + } + if (_shakeStrength > 0) + { + _shakeStrength = (float)Mathf.Lerp(_shakeStrength, 0, _shakeFade * delta); + } + notePlacementBar.Position = + _barInitPosition + + new Vector2( + _rng.RandfRange(-_shakeStrength, _shakeStrength), + _rng.RandfRange(-_shakeStrength, _shakeStrength) + ); + } + // Called when the node enters the scene tree for the first time. public override void _Ready() { @@ -38,6 +71,13 @@ public override void _Ready() _currentCombo = 0; comboMult = 1; notesToIncreaseCombo = 4; + + _barInitPosition = notePlacementBar.Position; + } + + public override void _Process(double delta) + { + ProcessShake(delta); } public void Setup(PlayerStats playerStats) @@ -123,10 +163,25 @@ public void HitNote() public void MissNote() { _currentCombo = 0; + bonusMult = 0; + DetermineComboMult(); + UpdateComboMultText(); + } + + public void IncreaseBonusMult(int amount = 1) + { + bonusMult += amount; DetermineComboMult(); UpdateComboMultText(); } + public void IncreaseCharge(int amount = 1) + { + _currentBarValue = Math.Min(_currentBarValue + amount, MaxValue); + UpdateNotePlacementBar(_currentBarValue); + UpdateComboMultText(); + } + // Placing a note resets the note placement bar public Note PlacedNote() { @@ -144,7 +199,7 @@ public bool CanPlaceNote() private void DetermineComboMult() { - comboMult = _currentCombo / notesToIncreaseCombo + 1; + comboMult = _currentCombo / notesToIncreaseCombo + 1 + bonusMult; } public int GetCurrentCombo() @@ -155,6 +210,7 @@ public int GetCurrentCombo() private void UpdateNotePlacementBar(int newValue) { notePlacementBar.Value = newValue; + _particles.Emitting = _currentBarValue >= MaxValue; } private void UpdateComboMultText() diff --git a/scenes/BattleDirector/test_battle_scene.tscn b/scenes/BattleDirector/test_battle_scene.tscn index e0b58697..12ab120a 100644 --- a/scenes/BattleDirector/test_battle_scene.tscn +++ b/scenes/BattleDirector/test_battle_scene.tscn @@ -37,12 +37,6 @@ script = ExtResource("3_8hff6") script = ExtResource("2_pcp76") CM = NodePath("../SubViewport") -[node name="SubViewport" parent="." instance=ExtResource("2_cupb3")] -offset_left = 80.0 -offset_top = 180.0 -offset_right = 560.0 -offset_bottom = 360.0 - [node name="NotePlacementBar" parent="." instance=ExtResource("7_3ko4g")] offset_top = 183.0 offset_bottom = 183.0 @@ -54,6 +48,12 @@ offset_right = 81.0 offset_bottom = 175.0 texture = SubResource("GradientTexture2D_bajwn") +[node name="SubViewport" parent="." instance=ExtResource("2_cupb3")] +offset_left = 80.0 +offset_top = 180.0 +offset_right = 560.0 +offset_bottom = 360.0 + [node name="BackGround" type="TextureRect" parent="."] z_index = -1 offset_right = 640.0 diff --git a/scenes/ChestScene/ChestScene.cs b/scenes/ChestScene/ChestScene.cs index 4688d79f..2b130cbd 100644 --- a/scenes/ChestScene/ChestScene.cs +++ b/scenes/ChestScene/ChestScene.cs @@ -29,7 +29,7 @@ public override void _Process(double delta) private void GetLoot() { ChestButton.Disabled = true; - RewardSelect.CreateSelection(this, Player.Stats, 3).Selected += EndBattle; + RewardSelect.CreateSelection(this, Player.Stats, 3, "Relic").Selected += EndBattle; } private void EndBattle() diff --git a/scenes/Maps/assets/BattleIcon.png b/scenes/Maps/assets/BattleIcon.png index a93306c1..d83f3398 100644 Binary files a/scenes/Maps/assets/BattleIcon.png and b/scenes/Maps/assets/BattleIcon.png differ diff --git a/scenes/Maps/assets/BossIcon.png b/scenes/Maps/assets/BossIcon.png index 565eb878..a06089e0 100644 Binary files a/scenes/Maps/assets/BossIcon.png and b/scenes/Maps/assets/BossIcon.png differ diff --git a/scenes/Maps/assets/ChestIcon.png b/scenes/Maps/assets/ChestIcon.png index d4686e92..b4cf0feb 100644 Binary files a/scenes/Maps/assets/ChestIcon.png and b/scenes/Maps/assets/ChestIcon.png differ diff --git a/scenes/Puppets/scripts/PlayerStats.cs b/scenes/Puppets/scripts/PlayerStats.cs index 06a0c08e..f290debc 100644 --- a/scenes/Puppets/scripts/PlayerStats.cs +++ b/scenes/Puppets/scripts/PlayerStats.cs @@ -30,4 +30,10 @@ public void AddRelic(RelicTemplate relic) CurRelics = CurRelics.Append(relic).ToArray(); GD.Print("Adding relic: " + relic.Name); } + + public void AddNote(Note nSelection) + { + CurNotes = CurNotes.Append(nSelection).ToArray(); + GD.Print("Adding note: " + nSelection.Name); + } } diff --git a/scenes/UI/scripts/RewardSelect.cs b/scenes/UI/scripts/RewardSelect.cs index 00e3a039..a1a9c4bb 100644 --- a/scenes/UI/scripts/RewardSelect.cs +++ b/scenes/UI/scripts/RewardSelect.cs @@ -20,13 +20,23 @@ public partial class RewardSelect : CanvasLayer public event SelectionMadeHandler Selected; private PlayerStats _player; - private RelicTemplate[] _choices; - private RelicTemplate _selection; - public void Initialize(PlayerStats player, int amount) + private RelicTemplate[] _rChoices; //TODO: look into simplifying + private RelicTemplate _rSelection; + private Note[] _nChoices; + private Note _nSelection; + + public void Initialize(PlayerStats player, int amount, string type) { _player = player; - GenerateRelicChoices(amount); + if (type == "Relic") + { + GenerateRelicChoices(amount); + } + else + { + GenerateNoteChoices(amount); + } _acceptButton.Pressed += OnSelect; _skipButton.Pressed += OnSkip; @@ -34,16 +44,16 @@ public void Initialize(PlayerStats player, int amount) public override void _Process(double delta) { - _acceptButton.Visible = _selection != null; + _acceptButton.Visible = (_nSelection != null) || (_nChoices != null); } private void GenerateRelicChoices(int amount = 1) { //should probably change this so that the amount of relics offered can be changed when BD calls it //i.e less options when killing trash mobs/basic/weak enemies - _choices = Scribe.GetRandomRelics(_player.CurRelics, amount); + _rChoices = Scribe.GetRandomRelics(_player.CurRelics, amount); - foreach (var relic in _choices) + foreach (var relic in _rChoices) { var button = new DisplayButton(); button.Display(relic.Texture, relic.Tooltip, relic.Name); @@ -53,29 +63,64 @@ private void GenerateRelicChoices(int amount = 1) } } - public static RewardSelect CreateSelection(Node2D parent, PlayerStats playerStats, int amount) + private void GenerateNoteChoices(int amount = 1) + { + //should probably change this so that the amount of relics offered can be changed when BD calls it + //i.e less options when killing trash mobs/basic/weak enemies + _nChoices = Scribe.GetRandomRewardNotes(amount); + + foreach (var note in _nChoices) + { + var button = new DisplayButton(); + button.Display(note.Texture, note.Tooltip, note.Name); + button.Pressed += () => OnNoteSelected(note); + ButtonContainer.AddChild(button); + button.GrabFocus(); + } + } + + public static RewardSelect CreateSelection( + Node2D parent, + PlayerStats playerStats, + int amount, + string type + ) { var rewardUI = GD.Load("res://scenes/UI/RewardSelectionUI.tscn") .Instantiate(); parent.AddChild(rewardUI); - rewardUI.Initialize(playerStats, amount); + rewardUI.Initialize(playerStats, amount, type); parent.GetTree().Paused = true; return rewardUI; } + private void OnNoteSelected(Note choiceNote) + { + _nSelection = choiceNote; + _description.Text = $"{choiceNote.Name}: {choiceNote.Tooltip}"; + } + private void OnRelicSelected(RelicTemplate choiceRelic) { - _selection = choiceRelic; + _rSelection = choiceRelic; _description.Text = $"{choiceRelic.Name}: {choiceRelic.Tooltip}"; } private void OnSelect() { - if (_selection == null) + if (_nSelection == null && _rSelection == null) return; - GD.Print("Relic selected: " + _selection.Name); - _player.AddRelic(_selection); + if (_nSelection != null) + { + GD.Print("Note selected: " + _nSelection.Name); + _player.AddNote(_nSelection); + } + else if (_rSelection != null) + { + GD.Print("Relic selected: " + _rSelection.Name); + _player.AddRelic(_rSelection); + } GetTree().Paused = false; Selected?.Invoke(); QueueFree();