private void Start() { #if !UltimateFPSIsPresent ACDebug.LogWarning("'UltimateFPSIsPresent' must be listed in your Unity Player Setting's 'Scripting define symbols' for AC's UFPS integration to work."); return; #else // Tell the AC Player component that we'l be controlling movement/rotation manually during Cutscenes player.FirstPersonCamera = fpCamera.transform; player.SetAnimEngine(AnimationEngine.Custom); player.motionControl = MotionControl.Manual; // Assign a short delay whenever we load a saved game, to prevent firing when click if (KickStarter.saveSystem) { KickStarter.saveSystem.SetGameplayReturnTime(0.1f); } // Fixes gun sounds from not always playing AudioListener.pause = false; // Add events to climbing interactable if (fpPlayerEventHandler != null) { fpPlayerEventHandler.Climb.StartCallbacks += OnStartClimb; fpPlayerEventHandler.Climb.StopCallbacks += OnStopClimb; } #endif }
private void Start() { #if !UltimateFPSIsPresent ACDebug.LogWarning("'UltimateFPSIsPresent' must be listed in your Unity Player Setting's 'Scripting define symbols' for AC's UFPS integration to work."); return; #else // Assign the UFPS components, and report warnings if they are not present fpCamera = GetComponentInChildren <vp_FPCamera>(); fpController = GetComponentInChildren <vp_FPController>(); fpInput = GetComponentInChildren <vp_FPInput>(); _audioListener = GetComponentInChildren <AudioListener>(); if (fpController == null) { ACDebug.LogWarning("Cannot find UFPS script 'vp_FPController' anywhere on '" + gameObject.name + "'."); } if (fpInput == null) { ACDebug.LogWarning("Cannot find UFPS script 'vp_FPInput' anywhere on '" + gameObject.name + "'."); } if (fpCamera == null) { ACDebug.LogWarning("Cannot find UFPS script 'vp_FPCamera' anywhere on '" + gameObject.name + "'."); } if (KickStarter.settingsManager != null && KickStarter.settingsManager.movementMethod != MovementMethod.FirstPerson) { ACDebug.Log("The Ultimate FPS integration script requires the Settings Manager's 'Movement method' is set to 'First Person'"); } // Tell the AC Player component that we'l be controlling movement/rotation manually during Cutscenes player = GetComponent <Player>(); player.FirstPersonCamera = fpCamera.transform; player.SetAnimEngine(AnimationEngine.Custom); player.motionControl = MotionControl.Manual; // Assign a short delay whenever we load a saved game, to prevent firing when click if (KickStarter.saveSystem) { KickStarter.saveSystem.SetGameplayReturnTime(0.1f); } // Fixes gun sounds from not always playing AudioListener.pause = false; #endif }
protected void Start() { #if !UltimateFPSIsPresent ACDebug.LogError("'UltimateFPSIsPresent' must be listed in your Unity Player Setting's 'Scripting define symbols' for AC's UFPS integration to work.", this); return; #else // Tell the AC Player component that we'l be controlling movement/rotation manually during Cutscenes player.FirstPersonCamera = fpCamera.transform; player.SetAnimEngine(AnimationEngine.Custom); player.motionControl = MotionControl.Manual; // Fixes gun sounds from not always playing AudioListener.pause = false; // Add events to climbing interactable if (fpPlayerEventHandler != null) { fpPlayerEventHandler.Climb.StartCallbacks += OnStartClimb; fpPlayerEventHandler.Climb.StopCallbacks += OnStopClimb; } #endif }
private void Start() { #if !UltimateFPSIsPresent ACDebug.LogWarning ("'UltimateFPSIsPresent' must be listed in your Unity Player Setting's 'Scripting define symbols' for AC's UFPS integration to work."); return; #else // Assign the UFPS components, and report warnings if they are not present fpCamera = GetComponentInChildren <vp_FPCamera>(); fpController = GetComponentInChildren <vp_FPController>(); fpInput = GetComponentInChildren <vp_FPInput>(); _audioListener = GetComponentInChildren <AudioListener>(); if (fpController == null) { ACDebug.LogWarning ("Cannot find UFPS script 'vp_FPController' anywhere on '" + gameObject.name + "'."); } if (fpInput == null) { ACDebug.LogWarning ("Cannot find UFPS script 'vp_FPInput' anywhere on '" + gameObject.name + "'."); } if (fpCamera == null) { ACDebug.LogWarning ("Cannot find UFPS script 'vp_FPCamera' anywhere on '" + gameObject.name + "'."); } if (KickStarter.settingsManager != null && KickStarter.settingsManager.movementMethod != MovementMethod.FirstPerson) { ACDebug.Log ("The Ultimate FPS integration script requires the Settings Manager's 'Movement method' is set to 'First Person'"); } // Tell the AC Player component that we'l be controlling movement/rotation manually during Cutscenes player = GetComponent <Player>(); player.FirstPersonCamera = fpCamera.transform; player.SetAnimEngine (AnimationEngine.Custom); player.motionControl = MotionControl.Manual; // Assign a short delay whenever we load a saved game, to prevent firing when click if (KickStarter.saveSystem) { KickStarter.saveSystem.SetGameplayReturnTime (0.1f); } // Fixes gun sounds from not always playing AudioListener.pause = false; #endif }