AI补足注释(已经快看不懂了)
实现i18n 优化部分模块的逻辑以优化性能 修复物品展示框打开时按下ESC唤出暂停菜单但没有暂停的bug Signed-off-by: Eicy <im@crash.work>
This commit is contained in:
@@ -4,13 +4,19 @@ using Items.Interface;
|
||||
|
||||
namespace Items
|
||||
{
|
||||
// 测试物品类,继承自 ItemBase 并实现 IItem 接口
|
||||
public class TestItem : ItemBase, IItem
|
||||
{
|
||||
// 重写物品激活方法
|
||||
protected override void ActivateItem()
|
||||
{
|
||||
// 调用基类的激活方法
|
||||
base.ActivateItem();
|
||||
//EventManager.Instance.OnDialogPop(index);
|
||||
EventManager.Instance.OnItemDialog(gameObject.name);
|
||||
|
||||
// 触发物品对话事件,使用物品名称作为参数
|
||||
EventManager.Instance.OnItemDialog(itemNameKey);
|
||||
EventManager.Instance.OnDialogPop(index);
|
||||
// 销毁当前物体
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user