Fix chinthe animations

This commit is contained in:
2025-04-10 00:04:31 -07:00
parent a7381658f4
commit 753ba60f0f
11 changed files with 405 additions and 399 deletions

View File

@@ -20,24 +20,41 @@ public partial class PauseDebugMenu : Control, IDebugMenu
[Node] public OptionButton SpawnItemDropDown { get; set; } = default;
private ImmutableList<InventoryItem> SpawnableItems;
[Node] public OptionButton SpawnEnemyDropDown { get; set; } = default!;
private ImmutableList<InventoryItem> _spawnableItems;
private ImmutableList<string> _spawnableEnemies;
private ItemDatabase _itemDatabase;
private string _sproingyScene = @"res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn";
private string _michaelScene = @"res://src/enemy/enemy_types/02. michael/Michael.tscn";
private string _filthEaterScene = @"res://src/enemy/enemy_types/03. filth_eater/FilthEater.tscn";
public override void _Ready()
{
VisibilityChanged += PauseDebugMenu_VisibilityChanged;
LoadNextFloorButton.Pressed += LoadNextFloorButton_Pressed;
_itemDatabase = new ItemDatabase();
SpawnableItems = _itemDatabase.Items;
foreach (var item in SpawnableItems)
SpawnItemDropDown.AddItem(item.ItemName, SpawnableItems.IndexOf(item));
_spawnableItems = _itemDatabase.Items;
foreach (var item in _spawnableItems)
SpawnItemDropDown.AddItem(item.ItemName, _spawnableItems.IndexOf(item));
SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected;
_spawnableEnemies = [_sproingyScene, _michaelScene, _filthEaterScene];
SpawnEnemyDropDown.ItemSelected += SpawnEnemyDropDown_ItemSelected;
}
private void SpawnEnemyDropDown_ItemSelected(long index)
{
}
private void SpawnItemDropDown_ItemSelected(long index)
{
var itemToSpawn = SpawnableItems.ElementAt((int)index);
var itemToSpawn = _spawnableItems.ElementAt((int)index);
var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
duplicated.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2);
AddChild(duplicated);