Exemplo n.º 1
0
    public void SellTurret()
    {
        PlayerStats.money += turretBlueprint.GetSellPrice();

        GameObject effect = (GameObject)Instantiate(buildManager.sellEffect, GetBuildPosition(), Quaternion.identity);

        Destroy(effect, 5f);

        Destroy(turret);
        turretBlueprint = null;
    }
Exemplo n.º 2
0
    public void SellTurret()
    {
        PlayerStats.Money += turretBlueprint.GetSellPrice();

        // get rid of turret
        Destroy(turret);
        isUpgraded      = false;
        turretBlueprint = null;
        // also create a particle effect
        CreateEffect(buildManager.sellEffect);
        Debug.Log("Turret sold!");
    }