BGJ-2022.1/Assets/Scripts/Level/LevelEnd.cs

18 lines
360 B
C#
Raw Permalink Normal View History

2022-02-25 22:56:10 +03:00
namespace Level
{
using UnityEngine;
public class LevelEnd : MonoBehaviour
{
private Level level = null;
private void Awake() => level = GetComponentInParent<Level>();
public void EndLevel()
{
level.EndLevel();
LevelManager.Instance.SwitchToLevel(level.LevelNumber + 1);
}
2022-02-25 22:56:10 +03:00
}
}