Пример #1
0
 private void OnUnitCountChanged(TransportUnitInfo unit)
 {
     UpdatePlanetStateGenerators();
     if (IsLoaded)
     {
         Generators.GetGeneratorInfo(unit.GeneratorId).Update(0, Generators);
     }
 }
Пример #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);
                }
            }
        }
Пример #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);
     }
 }
Пример #4
0
 public static void OnGeneratorUnitsCountChanged(TransportUnitInfo info)
 {
     GeneratorUnitsCountChanged?.Invoke(info);
 }