Ejemplo n.º 1
0
        void BuildTurret(TurretBlueprint blueprint)
        {
            if (PlayerStats.Money < blueprint.cost)
            {
                Debug.Log("Not enough money to build that!");

                return;
            }

            PlayerStats.Money -= blueprint.cost;

            GameObject _turret = (GameObject)Instantiate(blueprint.prefab, GetBuildPosition(), Quaternion.identity);

            turret = _turret;

            turretBlueprint = blueprint;

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

            Destroy(effect, 5f);

            Debug.Log("Turret build!");
        }
Ejemplo n.º 2
0
        public void SelectTurretToBuild(TurretBlueprint turret)
        {
            turretToBuild = turret;

            DeselectNode();
        }