Example #1
0
 private void OnUnitCountChanged(TransportUnitInfo unit)
 {
     UpdatePlanetStateGenerators();
     if (IsLoaded)
     {
         Generators.GetGeneratorInfo(unit.GeneratorId).Update(0, Generators);
     }
 }
Example #2
0
        private void OnUnitCountChanged(TransportUnitInfo unit)
        {
            if (IsLoaded)
            {
                SendEventToNonCompleted(new TutorialEventData(TutorialEventName.UnitCountChanged, unit));

                if (unit.TotalCount > 0 && unit.GeneratorId == 1)
                {
                    SkipState(TutorialStateName.BuyTaxi);
                }
            }
        }
Example #3
0
 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);
     }
 }
Example #4
0
 public static void OnGeneratorUnitsCountChanged(TransportUnitInfo info)
 {
     GeneratorUnitsCountChanged?.Invoke(info);
 }