Ejemplo n.º 1
0
        // Start is called before the first frame update
        void Awake()
        {
            this.level = SaveEngine.LoadLevels().Last();

            this.AddCash(this.level.InitialCash);

            this.SetActualWave(0);

            this.gameObject.GetComponent <TilemapController>().Initialize(this.level.TileMap, this.StartPoint);
        }
Ejemplo n.º 2
0
        private void RenderLevels()
        {
            this.Helpers.RemoveChildrens(this.Container);

            this.levels = SaveEngine.LoadLevels();

            foreach (var level in this.levels)
            {
                var levelButton = Instantiate(LevelPrefab, this.Container.transform);

                var levelScript = levelButton.GetComponent <LevelUI>();
                levelScript.Initialize(level);
            }
        }