浏览代码

fix: add null check (#467)

/main
GitHub 3 年前
当前提交
e8854e92
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/IntEventChannelSO.cs

7
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/IntEventChannelSO.cs


using UnityEngine.Events;
using UnityEngine;
using UnityEngine;
using UnityEngine.Events;
/// <summary>
/// This class is used for Events that have one int argument.

public UnityAction<int> OnEventRaised;
public void RaiseEvent(int value)
{
OnEventRaised.Invoke(value);
if (OnEventRaised != null)
OnEventRaised.Invoke(value);
}
}
正在加载...
取消
保存