您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
19 行
396 B
19 行
396 B
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// This class detecs when the level(Location) ends
|
|
/// </summary>
|
|
|
|
public class LevelEnd : MonoBehaviour
|
|
{
|
|
public LoadEvent onLevelEnd;
|
|
public GameScene[] locationsToLoad;
|
|
public bool showLoadScreen;
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.CompareTag("Player"))
|
|
{
|
|
onLevelEnd.Raise(locationsToLoad, showLoadScreen);
|
|
}
|
|
}
|
|
}
|