예제 #1
0
        public SerializableVehicleObjective CreateVehicleObjective(SerializableVehicleObjective orig)
        {
            var tmpVeh = new Vehicle(orig.GetVehicle().Model, orig.GetVehicle().Position)
            {
                PrimaryColor = orig.GetVehicle().PrimaryColor,
                SecondaryColor = orig.GetVehicle().SecondaryColor,
            };
            var blip = tmpVeh.AttachBlip();
            blip.Color = Color.Red;
            blip.Scale = 0.7f;
            _blips.Add(blip);

            tmpVeh.IsPositionFrozen = false;
            tmpVeh.Rotation = orig.GetVehicle().Rotation;
            var tmpObj = (SerializableVehicleObjective)orig.Clone();
            tmpObj.SetVehicle(tmpVeh);
            CurrentMission.Objectives.Add(tmpObj);
            return tmpObj;
        }
예제 #2
0
        public SerializableVehicleObjective CreateVehicleObjective(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.Red;
            blip.Scale = 0.7f;
            _blips.Add(blip);

            tmpVeh.IsPositionFrozen = false;
            tmpVeh.Rotation = rotation;
            var tmpObj = new SerializableVehicleObjective();
            tmpObj.SetVehicle(tmpVeh);
            tmpObj.SpawnAfter = 0;
            tmpObj.ActivateAfter = 0;
            tmpObj.Health = 1000;
            CurrentMission.Objectives.Add(tmpObj);
            return tmpObj;
        }