25 lines
700 B
C#
25 lines
700 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
|
|
[CreateAssetMenu(menuName ="Event/SceneLoadEventSO")]
|
|
public class SceneLoadEventSO : ScriptableObject
|
|
{
|
|
public UnityAction<GameSceneSO, Vector3, bool> LoadRequestEvent;
|
|
|
|
//把上面的事件启动
|
|
/// <summary>
|
|
/// 场景加载请求
|
|
/// </summary>
|
|
/// <param name="locationToLoad">场景</param>
|
|
/// <param name="posToGo">坐标</param>
|
|
/// <param name="fadeScreen">是否淡入淡出</param>
|
|
public void RaiseLoadRequesEvent(GameSceneSO locationToLoad, Vector3 posToGo, bool fadeScreen)
|
|
{
|
|
LoadRequestEvent?.Invoke(locationToLoad, posToGo, fadeScreen);
|
|
}
|
|
|
|
}
|