public void UpdateLife(GamePlayerScene scene) { int defence = 0; foreach(var feagure in scene.Figures) { defence+=feagure.Deffence; } Life.text = string.Format("{0:D2}", defence); }
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); } } }