protected void Awake() { Cam = GetComponentInChildren <Camera>().transform; Pivot = Cam.parent; if (manager) { manager.SetCamera(this); } if (startState) { SetState(startState); } Cursor.lockState = m_LockCursor ? CursorLockMode.Locked : CursorLockMode.None; // Lock or unlock the cursor. Cursor.visible = !m_LockCursor; m_PivotEulers = Pivot.rotation.eulerAngles; m_PivotTargetRot = Pivot.transform.localRotation; m_TransformTargetRot = transform.localRotation; inputSystem = DefaultInput.GetInputSystem(PlayerID); Horizontal.InputSystem = Vertical.InputSystem = inputSystem; //Update the Input System on the Axis }
public string PlayerID = "Player0"; //This is use for Rewired Asset #endregion void Awake() { Input_System = DefaultInput.GetInputSystem(PlayerID); //Get Which Input System is being used foreach (var i in inputs) { i.InputSystem = Input_System; //Update to all the Inputs the Input System } List_to_Dictionary(); }
void Awake() { Input_System = DefaultInput.GetInputSystem(PlayerID); //Get Which Input System is being used Horizontal.InputSystem = Vertical.InputSystem = Input_System; //UpDown.InputSystem = Input_System; foreach (var i in inputs) { i.InputSystem = Input_System; //Update to all the Inputs the Input System } List_to_Dictionary(); InitializeCharacter(); }
protected void Awake() { Cam = GetComponentInChildren <Camera>(); CamT = GetComponentInChildren <Camera>().transform; Pivot = Cam.transform.parent; currentState = null; NextState = null; if (manager) { manager.SetCamera(this); } if (DefaultState) { Set_State(DefaultState); } Cursor.lockState = m_LockCursor ? CursorLockMode.Locked : CursorLockMode.None; // Lock or unlock the cursor. Cursor.visible = !m_LockCursor; m_PivotEulers = Pivot.rotation.eulerAngles; m_PivotTargetRot = Pivot.transform.localRotation; m_TransformTargetRot = transform.localRotation; ActiveFOV = Cam.fieldOfView; inputSystem = DefaultInput.GetInputSystem(PlayerID); Horizontal.InputSystem = Vertical.InputSystem = inputSystem; //Update the Input System on the Axis defaultUpdate = updateType; if (DefaultState == null) { // FreeLookCameraState defaault = ScriptableObject.CreateInstance< new FreeLookCameraState(Cam.fieldOfView, Pivot.localPosition, CamT.localPosition); DefaultState = ScriptableObject.CreateInstance <FreeLookCameraState>(); DefaultState.CamFOV = Cam.fieldOfView; DefaultState.PivotPos = Pivot.localPosition; DefaultState.CamPos = CamT.localPosition; DefaultState.name = "Default State"; OnStateChange.Invoke(); } }
public string PlayerID = "Player0"; //This is use for Rewired Asset #endregion void Awake() { Input_System = DefaultInput.GetInputSystem(PlayerID); //Get Which Input System is being used foreach (var i in inputs) { i.InputSystem = Input_System; //Update to all the Inputs the Input System } DInputs = new Dictionary <string, InputRow>(); foreach (var item in inputs) { DInputs.Add(item.name, item); } }
void Awake() { InputSystem = DefaultInput.GetInputSystem(PlayerID); //Get Which Input System is being used //Update to all the Inputs to the active Input System Horizontal.InputSystem = Vertical.InputSystem = UpDown.InputSystem = InputSystem; foreach (var i in inputs) { i.InputSystem = InputSystem; } List_to_Dictionary(); //Convert the Inputs to Dic... easier to find InitializeCharacter(); MoveCharacter = true; //Set that the Character can be moved }