Update items

This commit is contained in:
2024-09-16 01:05:15 -07:00
parent 660a5f5553
commit 55c521db3a
32 changed files with 480 additions and 142 deletions

View File

@@ -5,6 +5,7 @@ using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Godot;
using System;
public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, INode3D
{
@@ -129,6 +130,13 @@ public partial class Game : Node3D, IGame
Player.PauseButtonPressed += Player_PauseButtonPressed;
GameRepo.PlayerData.Inventory.EquippedItem += Inventory_EquippedItem;
GameEventDepot.EnemyDefeated += OnEnemyDefeated;
}
private void OnEnemyDefeated(Vector3 vector, EnemyStatResource resource)
{
}
private void Inventory_EquippedItem()

View File

@@ -1,4 +1,5 @@
using System;
using Godot;
using System;
namespace GameJamDungeon
{
@@ -37,8 +38,8 @@ namespace GameJamDungeon
event Action<ConsumableItemStats>? HealingItemConsumed;
public void OnHealingItemConsumed(ConsumableItemStats item);
event Action<EnemyStatResource>? EnemyDefeated;
public void OnEnemyDefeated(EnemyStatResource enemyStatResource);
event Action<Vector3, EnemyStatResource>? EnemyDefeated;
public void OnEnemyDefeated(Vector3 position, EnemyStatResource enemyStatResource);
}
public class GameEventDepot : IGameEventDepot
@@ -57,7 +58,7 @@ namespace GameJamDungeon
public event Action? UnequippedItem;
public event Action? InventorySorted;
public event Action<ConsumableItemStats>? HealingItemConsumed;
public event Action<EnemyStatResource>? EnemyDefeated;
public event Action<Vector3, EnemyStatResource>? EnemyDefeated;
public void OnOverworldEntered() => OverworldEntered?.Invoke();
public void OnDungeonAThemeAreaEntered() => DungeonAThemeAreaEntered?.Invoke();
@@ -73,7 +74,7 @@ namespace GameJamDungeon
public void OnInventorySorted() => InventorySorted?.Invoke();
public void OnHealingItemConsumed(ConsumableItemStats item) => HealingItemConsumed?.Invoke(item);
public void OnEnemyDefeated(EnemyStatResource enemyStatResource) => EnemyDefeated?.Invoke(enemyStatResource);
public void OnEnemyDefeated(Vector3 position, EnemyStatResource enemyStatResource) => EnemyDefeated?.Invoke(position, enemyStatResource);
public void Dispose()
{