コード例 #1
0
ファイル: BoardTileHandler.cs プロジェクト: rene-ye/Capstone
 public void resetDefault()
 {
     this.unit = null;
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getDefaultBench();
     this.gameObject.GetComponent <Image>().color  = Color.white;
     activateBars(false);
 }
コード例 #2
0
ファイル: BoardTileHandler.cs プロジェクト: rene-ye/Capstone
 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
ファイル: ShopButtonHandler.cs プロジェクト: rene-ye/Capstone
 private void resetDefault()
 {
     this.unit = null;
     cost.text = "";
     this.gameObject.GetComponent <Image>().sprite = UnitSpritePool.getDefaultShop();
 }
コード例 #4
0
ファイル: ShopButtonHandler.cs プロジェクト: rene-ye/Capstone
 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();
 }