private void SelectTower(TowerData tower) { if (!ResourceManager.Instance.HasGold(tower.cost)) { return; } Blueprint blueprint = Instantiate(tower.blueprintPrefab, player.transform); blueprint.Setup(player, blockedLayers, groundLayer); SelectedTower = new TowerSelection(tower, blueprint.GetComponent <Blueprint>()); Hide(); }
public void DeselectTower() { Destroy(SelectedTower.BlueprintInstance.gameObject); SelectedTower = null; }
void Awake() { materialBoxRect = new Rect(250, 600 - weaponBox.y , weaponBox.x, weaponBox.y); weaponBoxRect = new Rect(475, 600 - weaponBox.y , weaponBox.x, weaponBox.y); instance = this; }