Exemple #1
0
 public Paramedic(Vector3 position, float heading)
     : base(EntityCreator.CreateEMSPed(position, heading))
 {
     // all AdvancedPeds should call RegisterAdvancedPed but can't put it in the base constructor
     // because the generic type will always be AdvancedPed, instead of Firefighter, Paramedic, etc.
     // each AdvancedPed subclass with its own fiber and list
     RegisterAdvancedPed(this);
 }
        protected override void CreateInternal(out Vehicle vehicle, out AdvancedPed[] peds)
        {
            vehicle = EntityCreator.CreateEMSVehicle(SpawnLocation.Position, SpawnLocation.Heading);

            int seats = Math.Min(vehicle.PassengerCapacity + 1, 2);

            Paramedics = new Paramedic[seats];
            peds       = new AdvancedPed[seats];
            for (int i = 0; i < seats; i++)
            {
                Paramedic p = new Paramedic(Vector3.Zero, 0.0f);
                p.PreferedVehicleSeatIndex = i - 1;
                p.Ped.WarpIntoVehicle(vehicle, i - 1);

                Paramedics[i] = p;
                peds[i]       = p;
            }
        }
        protected override void CreateInternal(out Vehicle vehicle, out AdvancedPed[] peds)
        {
            vehicle = EntityCreator.CreateFirefighterVehicle(SpawnLocation.Position, SpawnLocation.Heading, FirefighterRole.Engine);

            int seats = Math.Min(vehicle.PassengerCapacity + 1, 4);

            Firefighters = new Firefighter[seats];
            peds         = new AdvancedPed[seats];
            for (int i = 0; i < seats; i++)
            {
                Firefighter f = new Firefighter(Vector3.Zero, 0.0f);
                f.PreferedVehicleSeatIndex = i - 1;
                f.Ped.WarpIntoVehicle(vehicle, i - 1);
                f.Equipment.SetEquipped <FireGearEquipment>(false);

                Firefighters[i] = f;
                peds[i]         = f;
            }
        }
Exemple #4
0
 protected override void CreateInternal()
 {
     Engine    = EntityCreator.CreateFirefighterVehicle(EngineSpawn.Position, EngineSpawn.Heading, FirefighterRole.Engine);
     Battalion = EntityCreator.CreateFirefighterVehicle(BattalionSpawn.Position, BattalionSpawn.Heading, FirefighterRole.Battalion);
     Rescue    = EntityCreator.CreateFirefighterVehicle(RescueSpawn.Position, RescueSpawn.Heading, FirefighterRole.Rescue);
 }
Exemple #5
0
 protected override void CreateInternal()
 {
     Ambulance = EntityCreator.CreateEMSVehicle(AmbulanceSpawn.Position, AmbulanceSpawn.Heading);
 }