protected override void CheckForUpdate() { soldierToggle.isOn = planetScript.GetIsTrainingSoldiers(); // note that, this will trigger createSoldier if (planetScript.planetOwnership == AbstractPlanet.Ownership.Player) { soldierToggle.interactable = true; soldierToggle.targetGraphic.transform.GetChild(0).gameObject.SetActive(true); } else { soldierToggle.interactable = false; soldierToggle.targetGraphic.transform.GetChild(0).gameObject.SetActive(false); } }
void UpdateIconStatus() { if (planet.GetIsTrainingSoldiers()) { soldierIcon.gameObject.SetActive(true); } else { soldierIcon.gameObject.SetActive(false); } if (ManagerScript.Instance.GetUpgrading() && planet.GetPlanetType() == AbstractPlanet.PlanetType.Reactor) { upgradeIcon.gameObject.SetActive(true); } else { upgradeIcon.gameObject.SetActive(false); } }