Beispiel #1
0
    public void Upgrade()
    {
        var  towerData  = data.GetComponent <Tower>();
        bool firstClick = currentTowerToBuild != towerData.upgradeTower;

        if (firstClick)
        {
            currentTowerToBuild = towerData.upgradeTower;
            ShowDetailsPanel(towerData.upgradeTower);
            //ShowTowerPreview(data.upgradeTower);
            //currentTowerBuildingSite.SetActive(false);
        }
        else
        {
            BuildTower(towerData.upgradeTower);
        }
    }
Beispiel #2
0
    public void Show(InfoData infoData, Vector3 position)
    {
        var damageData = infoData.GetComponent <DamageData>();

        title.text       = infoData.name;
        description.text = infoData.description;
        data.text        = "Dano: " + damageData.damage_ammount + " Velocidade: " + damageData.reloadTime;

        SetPosition(position);
    }
Beispiel #3
0
    public void ShowMenuAtPosition(InfoData data)
    {
        this.data = data;

        transform.position = data.transform.position;

        //gameObject.SetActive(true);

        towerRangeCircle.Show(data.GetComponent <DamageData>());

        currentTowerToBuild = null;

        BroadcastMessage("ShowOriginalIcon", SendMessageOptions.DontRequireReceiver);
    }