void Start() { planet = GetComponentInParent <HarvestablePlanet> (); visible = false; GraphicRoot.alpha = 0f; }
public void RegisterPlanet(HarvestablePlanet planet) { remainingPlanets.Add(planet); TotalPlanets = Mathf.Max(TotalPlanets, RemainingPlanets); if (PlanetCountUpdated != null) { PlanetCountUpdated(); } }
public void HarvestPlanet(HarvestablePlanet planet) { NotificationControl.SceneInstance.PostNotification(string.Format("Harvested {0} seeds from {1}!", planet.SeedYield, planet.planetName)); remainingPlanets.Remove(planet); if (PlanetCountUpdated != null) { PlanetCountUpdated(); } if (remainingPlanets.Count == 0) { HarvestedAllPlanets(); } }