public void SetPothole(PotholeManager potholeManager, float repairTime, PotholeSize potholeSize) { this.gameManager = FindObjectOfType <GameManager>(); this.potholeManager = potholeManager; this.repairTime = repairTime; this.size = potholeSize; this.timeSinceSpawn = 0.0f; this.carCount = 0; }
public void SetParams(Pothole pothole) { this.pothole = pothole; PotholeSize holeType = pothole.size; Image[] holes = potholeTypesPanel.GetComponentsInChildren <Image>(); uiHelper.SetPotholeTypeIcon(holes, holeType); Image[] workers = workersPanel.GetComponentsInChildren <Image>(); uiHelper.ChangeWorkerColor(0, workers); }
public void SetPotholeTypeIcon(Image[] holes, PotholeSize holeType) { ResetPotholeTypeIcons(holes); //Set t active the hole size switch (holeType) { case PotholeSize.Small: holes[0].color = activeColor; break; case PotholeSize.Medium: holes[1].color = activeColor; break; case PotholeSize.Big: holes[2].color = activeColor; break; } }