Improved look of main scene
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Fruitomation.Global;
|
||||
using System;
|
||||
using Fruitomation.Global;
|
||||
using Fruitomation.Game;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
@@ -13,16 +14,19 @@ namespace Fruitomation.UI
|
||||
[SerializeField] private GameObject MenuGrid;
|
||||
[SerializeField] private GameObject MenuItemPrefab;
|
||||
[SerializeField] private BuildingRegistry BuildingPrefabs;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
private void Update() =>
|
||||
Menu.SetActive(GameStateController.Is(GameState.BuildingMenu));
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
foreach (BuildingRegistry.BuildingInfo info in BuildingPrefabs.GetBuildings())
|
||||
{
|
||||
if (!UpgradeManager.Is(info.Requirement))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
GameObject go = Instantiate(MenuItemPrefab, MenuGrid.transform);
|
||||
Text text = go.GetComponentInChildren<Text>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user