This commit is contained in:
CortexCore
2023-10-20 22:46:14 +08:00
parent a160813262
commit 325f63d6bc
42 changed files with 1602 additions and 79 deletions

View File

@@ -64,7 +64,7 @@ namespace BITFALL
public override void OnAwake()
{
_health.OnSetAlive += OnSetAlive;
}
}
private void OnSetAlive(bool alive)
{
if (alive) return;

View File

@@ -1,4 +1,5 @@
using System;
using BITFALL.Entities.Equipment;
using UnityEngine;
using BITKit;
using BITKit.Entities;
@@ -27,7 +28,7 @@ namespace BITFALL
container.OnUsed += OnRemove;
container.OnRemove += OnRemove;
var playerEquipContainer = entity.Get<IPlayerEquipContainer>();
var playerEquipContainer = entity.Get<IEntityEquipmentContainer>();
playerEquipContainer.OnEquip += OnEquip;
playerEquipContainer.OnDeEquip += DeEquip;
}

View File

@@ -9,11 +9,7 @@ using BITKit.Entities;
namespace BITFALL
{
public interface IPlayerEquipContainer {
Action<IEquipmentSlot, IBasicItem> OnEquip { get; set; }
Action<IEquipmentSlot, IBasicItem> OnDeEquip { get; set; }
bool TryDeEquip<T>(T slot=default) where T : IEquipmentSlot;
}
/// <summary>
/// 玩家装备容器
/// 支持,护甲,头盔和背包等