Ejemplo n.º 1
0
    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);
            }
        }
    }
Ejemplo n.º 2
0
    private IEnumerator ShowCostOverlayDelay()
    {
        yield return(new WaitForSeconds(0.45f));

        overlay = BuildingCostOverlay.Instantiate(transform, buildingPrefab.GetWoodCost(), buildingPrefab.GetStoneCost(), buildingPrefab.GetMetalCost());
    }