Beispiel #1
0
        public SerializableVehicle CreateVehicle(SerializableVehicle orig)
        {
            var tmpVeh = new Vehicle(orig.GetEntity().Model, orig.GetEntity().Position, orig.GetEntity().Heading)
            {
                PrimaryColor = ((Vehicle)orig.GetEntity()).PrimaryColor,
                SecondaryColor = ((Vehicle)orig.GetEntity()).SecondaryColor,
            };

            var blip = tmpVeh.AttachBlip();
            blip.Color = Color.Orange;
            blip.Scale = 0.7f;
            _blips.Add(blip);

            tmpVeh.IsPositionFrozen = false;
            tmpVeh.Rotation = orig.GetEntity().Rotation;
            var tmpObj = (SerializableVehicle)orig.Clone();
            tmpObj.SetEntity(tmpVeh);
            CurrentMission.Vehicles.Add(tmpObj);
            return tmpObj;
        }
Beispiel #2
0
        public SerializableVehicle CreateVehicle(Model model, Vector3 pos, Rotator rotation, Color primColor, Color seconColor)
        {
            var tmpVeh = new Vehicle(model, pos)
            {
                PrimaryColor = primColor,
                SecondaryColor = seconColor,
            };

            var blip = tmpVeh.AttachBlip();
            blip.Color = Color.Orange;
            blip.Scale = 0.7f;
            _blips.Add(blip);

            tmpVeh.IsPositionFrozen = false;
            tmpVeh.Rotation = rotation;
            var tmpObj = new SerializableVehicle();
            tmpObj.SetEntity(tmpVeh);
            tmpObj.SpawnAfter = 0;
            tmpObj.RemoveAfter = 0;
            tmpObj.FailMissionOnDeath = false;
            tmpObj.Health = 1000;
            CurrentMission.Vehicles.Add(tmpObj);
            return tmpObj;
        }