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>();
|
|
|
|
|
2022-02-26 12:56:49 +03:00
|
|
|
public void EndLevel()
|
|
|
|
{
|
|
|
|
level.EndLevel();
|
|
|
|
Debug.Log(level.LevelNumber);
|
|
|
|
|
|
|
|
LevelManager.Instance.SwitchToLevel(level.LevelNumber + 1);
|
|
|
|
}
|
2022-02-25 22:56:10 +03:00
|
|
|
}
|
|
|
|
}
|