示例#1
0
 public void resetDefault()
 {
     this.unit = null;
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getDefaultBench();
     this.gameObject.GetComponent <Image>().color  = Color.white;
     activateBars(false);
 }
示例#2
0
 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);
 }
示例#3
0
 private void resetDefault()
 {
     this.unit = null;
     cost.text = "";
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getDefaultShop();
 }
示例#4
0
 public void setUnit(Unit u)
 {
     unit      = u;
     cost.text = u.cost.ToString();
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getSprite(unit.unit_name);
 }
示例#5
0
 public void setUnit(Unit u)
 {
     unit = u;
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getSprite(unit.unit_name);
     this.gameObject.GetComponent <Image>().color  = unit.getTierColor();
 }