예제 #1
0
 private void SetupProduction()
 {
     if (Global.World.TickIndex % 10 == 0)
     {
         foreach (var facility in Global.NotMyFacilities)
         {
             facility.InitialTickIndex = Global.World.TickIndex;
         }
         foreach (var facility in Global.MyFacilities)
         {
             TacticalActions.SetupProductionIfNeed(facility);
         }
     }
 }
예제 #2
0
        private void SetupProduction()
        {
            if (Global.World.TickIndex % 10 == 0)
            {
                var myFightersCount = Global.MyFighters.Vehicles.Count;
                var myHelisCount    = Global.MyHelicopters.Vehicles.Count;

                var enemyFightersCount = Global.EnemyFighters.Count();
                var enemyHeliCount     = Global.EnemyHelicopters.Count();


                if (myFightersCount < enemyFightersCount + enemyHeliCount)
                {
                    neededType = VehicleType.Fighter;
                }
                else if (myHelisCount < enemyHeliCount)
                {
                    neededType = VehicleType.Helicopter;
                }
                else
                {
                    if (Global.World.TickIndex % 1800 == 0)
                    {
                        neededType = VehicleType.Tank;
                    }
                    if (Global.World.TickIndex % 1800 == 600)
                    {
                        neededType = VehicleType.Arrv;
                    }
                    if (Global.World.TickIndex % 1800 == 1200)
                    {
                        neededType = VehicleType.Ifv;
                    }
                }

                foreach (var facility in Global.MyFacilities)
                {
                    TacticalActions.SetupProductionIfNeed(facility, neededType);
                }
            }
        }