public PlayingEnvironment(SpawnpointLocation spawnpoint, Wingsuit pilot, ParachuteConfig parachuteConfig, PilotCameraMountId selectedMount = PilotCameraMountId.Orbit) { Spawnpoint = spawnpoint; Pilot = pilot; ParachuteConfig = parachuteConfig; SelectedCameraMount = selectedMount; }
private void SwitchToMount(PilotCameraMountId cameraMountId) { var wingsuit = _data.PlayerPilotSpawner.ActivePilot.GetComponent <Wingsuit>(); if (cameraMountId == PilotCameraMountId.FirstPerson) { _data.ThirdPersonCameraMount.RemoveTarget(); _data.CameraManager.SwitchMount(wingsuit.HeadCameraMount); } else if (cameraMountId == PilotCameraMountId.Orbit) { _data.ThirdPersonCameraMount.SetWingsuitTarget(wingsuit.FlightStatistics); _data.CameraManager.SwitchMount(_data.ThirdPersonCameraMount); } }
private void SwitchToMount(PilotCameraMountId cameraMountId) { var parachuteFlightStats = _parachute.Pilot.FlightStatistics; if (cameraMountId == PilotCameraMountId.Orbit) { _data.ThirdPersonCameraMount.SetParachuteTarget(parachuteFlightStats, _parachute); _data.CameraManager.SwitchMount(_data.ThirdPersonCameraMount); } else if (cameraMountId == PilotCameraMountId.FirstPerson) { _data.ThirdPersonCameraMount.RemoveTarget(); _data.CameraManager.SwitchMount(_parachute.Pilot.HeadCameraMount); } else { throw new ArgumentOutOfRangeException("Unable to switch to mount " + cameraMountId + " because it does not exist"); } }
public PlayingEnvironment SelectMount(PilotCameraMountId cameraMount) { return(new PlayingEnvironment(Spawnpoint, Pilot, ParachuteConfig, cameraMount)); }