예제 #1
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (canAfford)
     {
         GetComponent <RectTransform>().localScale = new Vector3(1f, 1f, 1f);
     }
     tooltip.SetCurTooltip(tower.getTowerInfo());
 }
예제 #2
0
    public void SetTarget(Tower1 tower_in)
    {
        tower = tower_in;

        transform.position = tower.transform.position;

        towerDetails.text      = tower.getTowerInfo();
        sellButtonText.text    = tower.getSellInfo();
        upgradeButtonText.text = tower.getUpgradeInfo();

        //set range indicator size... this is not exact
        rangeIndicator.transform.localScale = new Vector2(tower.range * .8f, tower.range * .8f);
        rangeIndicator.enabled = true;
        ui.SetActive(true);
    }