Simple Level Template Prefab Added

This commit is contained in:
2022-02-25 22:56:10 +03:00
parent 75ea014fbf
commit 8d1e53d442
12 changed files with 3030 additions and 1064 deletions

View File

@@ -41,6 +41,8 @@ namespace Level
needsRestart = false;
}
public void EndLevel() => PlayerPrefs.SetInt(LevelName, 1);
[ContextMenu("Restart")]
public void Restart() => LevelManager.Instance.SwitchToLevel(LevelName);
}

View File

@@ -0,0 +1,12 @@
namespace Level
{
using UnityEngine;
public class LevelEnd : MonoBehaviour
{
private Level level = null;
private void Awake() => level = GetComponentInParent<Level>();
public void EndLevel() => level.EndLevel();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 696558d6c83d74a498934105513921b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: