_xiaofang/xiaofang/Assets/Res/gsj/scripts/ItemInfo.cs
2024-12-20 10:10:19 +08:00

29 lines
574 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class ItemInfo : MonoBehaviour
{
public string status;
public int accountName;
public UnityEvent statusChanged; // 新增状态变化事件
// Start is called before the first frame update
void Start()
{
}
public void SetStatus(string newStatus)
{
status = newStatus;
statusChanged.Invoke(); // 当状态改变时触发事件
}
// Update is called once per frame
void Update()
{
}
}