// Update is called once per frame void Start() { if (NoInputs) { MalbersInput input = null; for (int i = 0; i < targets.Length; i++) { input = targets[i].GetComponent <MalbersInput>(); if (input) { input.enabled = false; } } m = GetComponent <MFreeLookCamera>(); if (m) { input = m.Target.GetComponent <MalbersInput>(); if (input) { input.enabled = true; } for (int i = 0; i < targets.Length; i++) { if (targets[i] == m.Target) { current = i; break; } } } } }
private void Start() { M_FreeLookCamera = GetComponent <MFreeLookCamera>(); ResetWithState(); m_RayHitComparer = new RayHitComparer(); // create a new RayHitComparer M_FreeLookCamera.OnStateChange.AddListener(SetOriginalDist); }
public void SetCamera(MFreeLookCamera Freecamera) { mCamera = Freecamera; if (mCamera) { cam = mCamera.Cam.GetComponent <Camera>(); } ChangeStates = StateTransition(transition); currentState = null; NextState = null; Mounted = null; MountedTarget = null; }
// Update is called once per frame void Start() { if (NoInputs) { IInputSource input = null; for (int i = 0; i < targets.Length; i++) { if (targets[i]) { input = targets[i].GetComponent <IInputSource>(); if (input != null) { input.Enable(false); } } } m = GetComponent <MFreeLookCamera>(); if (m && m.Target) { input = m.Target.GetComponent <IInputSource>(); if (input != null) { input.Enable(true); } for (int i = 0; i < targets.Length; i++) { if (targets[i] == m.Target) { current = i; break; } } } } }
public void SetCamera(MFreeLookCamera Freecamera) => mCamera = Freecamera;