private void CreateInfo(Building building) { UI.BuildingInfo newBuilding = Instantiate(summaryPrefab); newBuilding.transform.SetParent(summaryParent, false); newBuilding.nameText.text = building.name; newBuilding.amountText.text = "1"; newBuilding.scoreText.text = Mathf.FloorToInt(building.score).ToString(); info.Add(newBuilding); }
public void AddStackScore() { UI.BuildingInfo newBuilding = Instantiate(summaryPrefab); newBuilding.transform.SetParent(summaryParent, false); newBuilding.transform.SetAsFirstSibling(); newBuilding.nameText.text = "Tower"; newBuilding.amountText.text = blockSpawner.GetBlockCount().ToString(); Metrics.Instance.GetBlockAmount(blockSpawner.GetBlockCount()); Metrics.Instance.PostAnalytics(); newBuilding.scoreText.text = HighScore.CurrentScore.ToString("0"); info.Add(newBuilding); }