示例#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);
 }