public void AddDrone(MyDrone drone) { Debug.Assert(!m_drones.Contains(drone), "Duplicit drone add."); m_drones.Add(drone); }
private void TakeControlOfDrone(MyDrone drone) { CameraAttachedTo = MyCameraAttachedToEnum.Drone; drone.OnClosing += OnControlledDroneClose; ControlledDrone = drone; ControlledDrone.ActiveAI = false; ControlledDrone.Config.AutoLeveling.SetOff(); MySession.PlayerShip.StopSounds(); MySession.PlayerShip.SelectShipCamera(); MyGuiManager.GetRemoteViewDroneTextures(); MyAudio.AddCue2D(MySoundCuesEnum.SfxAcquireDroneOn); if (m_idleVehicleCue.HasValue && m_idleVehicleCue.Value.IsPlaying) { m_idleVehicleCue.Value.Stop(SharpDX.XACT3.StopFlags.Release); } m_idleVehicleCue = MyAudio.AddCue2D(MySoundCuesEnum.VehLoopDrone); }
public void RemoveDrone(MyDrone drone) { Debug.Assert(m_drones.Contains(drone)); m_drones.Remove(drone); UpdateSecondaryCamera(true); }