private IEnumerator ShowCostOverlayDelay() { yield return(new WaitForSeconds(0.45f)); var selected = SelectionManager.GetInstance().GetFirstSelected(); if (selected != null) { var placeable = selected.GetComponent <Placeable>(); if (placeable != null) { overlay = BuildingCostOverlay.Instantiate(transform, placeable.WoodUpgradeCost, placeable.StoneUpgradeCost, placeable.MetalUpgradeCost); } } }
private IEnumerator ShowCostOverlayDelay() { yield return(new WaitForSeconds(0.45f)); overlay = BuildingCostOverlay.Instantiate(transform, buildingPrefab.GetWoodCost(), buildingPrefab.GetStoneCost(), buildingPrefab.GetMetalCost()); }