private void OnUnitCountChanged(TransportUnitInfo unit) { UpdatePlanetStateGenerators(); if (IsLoaded) { Generators.GetGeneratorInfo(unit.GeneratorId).Update(0, Generators); } }
private void OnUnitCountChanged(TransportUnitInfo unit) { if (IsLoaded) { SendEventToNonCompleted(new TutorialEventData(TutorialEventName.UnitCountChanged, unit)); if (unit.TotalCount > 0 && unit.GeneratorId == 1) { SkipState(TutorialStateName.BuyTaxi); } } }
public TransportUnitInfo GetUnit(int generatorId) { if (Units.ContainsKey(generatorId)) { return(Units[generatorId]); } else { TransportUnitInfo unit = new TransportUnitInfo(generatorId, 0); Units.Add(generatorId, unit); return(unit); } }
public static void OnGeneratorUnitsCountChanged(TransportUnitInfo info) { GeneratorUnitsCountChanged?.Invoke(info); }