Felix Boucher 43bc2c75f2 work on game scene + fix bugs
problems :

- game scene was not as shown in the GDD
- problem when moving tilemap (the placeholders didn't follow)
- possible to place units outside the game area

solutions :

- try to make the game scene as close to the gdd as possible
- don't move the tilemap : move the camera instead (this keeps the world position of tilemap intact)
- there was a logic bug in the DraggablePlaceholder. It ain't anymore
2023-07-11 15:52:43 -04:00

18 lines
494 B
C#

using UnityEngine;
using GatherAndDefend.LevelEditor;
public class LevelManagerScript : SingletonBehaviour<LevelManagerScript>
{
public Level firstLevel;
protected override void Awake()
{
DontDestroyOnLoad(gameObject);
if (!firstLevel) throw new System.Exception("there is no first level set in the level manager script");
LevelManager.Instance.LoadLevel(firstLevel, true);
}
void Update()
{
LevelManager.Instance.UpdateLevel();
}
}