2024-04-20 22:05:01 +02:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class GameManager : MonoBehaviour
|
|
|
|
{
|
2024-04-20 23:32:42 +02:00
|
|
|
public float Balance = 0;
|
2024-04-20 22:05:01 +02:00
|
|
|
public static GameManager Instance;
|
|
|
|
|
2024-04-20 22:07:34 +02:00
|
|
|
public bool IsBuildMode = false;
|
2024-04-20 22:42:06 +02:00
|
|
|
private Tower selectedTower;
|
2024-04-21 00:02:41 +02:00
|
|
|
|
|
|
|
public TowerInfo ShopSelectedTower;
|
|
|
|
|
2024-04-20 22:42:06 +02:00
|
|
|
public Tower SelectedTower { get { return selectedTower; } set {
|
|
|
|
if (selectedTower != null)
|
|
|
|
selectedTower.TowerSelected(false);
|
|
|
|
|
|
|
|
selectedTower = value;
|
2024-04-20 23:32:42 +02:00
|
|
|
if (selectedTower != null)
|
|
|
|
selectedTower.TowerSelected(true);
|
2024-04-20 22:42:06 +02:00
|
|
|
}}
|
2024-04-20 22:07:34 +02:00
|
|
|
|
2024-04-20 22:20:20 +02:00
|
|
|
private void Awake()
|
2024-04-20 22:05:01 +02:00
|
|
|
{
|
|
|
|
if (Instance != this)
|
|
|
|
Destroy(Instance);
|
|
|
|
Instance = this;
|
|
|
|
}
|
|
|
|
}
|