public bool setUnit(Unit u) { if (this.unit == null) { unit = u; this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getSprite(unit.unit_name); this.gameObject.GetComponent <Image>().color = unit.getTierColor(); return(true); } return(false); }
public void setUnit(Unit u) { unit = u; cost.text = u.cost.ToString(); this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getSprite(unit.unit_name); }
public void setUnit(Unit u) { unit = u; this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getSprite(unit.unit_name); this.gameObject.GetComponent <Image>().color = unit.getTierColor(); }