示例#1
0
    public void UpdateLife(GamePlayerScene scene)
    {
        int defence = 0;
        foreach(var feagure in scene.Figures)
        {
            defence+=feagure.Deffence;
        }

        Life.text = string.Format("{0:D2}", defence);
    }
示例#2
0
 void ResetPlayerFigures(GamePlayerScene playerScene, bool isHighLighted )
 {
     foreach( var figure in playerScene.Figures)
     {
         var renderer = figure.GetComponent<Renderer>();
         if (isHighLighted)
         {
             var cell = Grid.GetCellByObject<GameUnit>(figure);
             if (cell != null)
                 cell.SetActive(isHighLighted);
         }
     }
 }