public void Start() { AetherInput.GetUIActions().Cancel.performed += ToggleCancelCallback; AetherInput.GetUIActions().Customize.performed += ToggleCustomizationCallback; AetherInput.GetUIActions().Ready.performed += ToggleReadyCallback; AetherInput.GetUIActions().Submit.performed += SubmitInputCallback; }
void Start() { m_PlayerStance = GetComponent <PlayerStance>(); AetherInput.GetPlayerActions().UseSkill.performed += UseSkillAt; AetherInput.GetPlayerActions().SwitchSkills.performed += SwitchSkills; m_ItemSkillSlots = new Queue <SkillItem>(); }
void Start() { AetherInput.GetPlayerActions().Jump.performed += JumpInputCallback; AetherInput.GetPlayerActions().Dodge.performed += DodgeInputCallback; m_CharacterController = GetComponent <CharacterController>(); m_PlayerStance = GetComponent <PlayerStance>(); m_PlayerCombatHandler = GetComponent <PlayerCombatHandler>(); }
private void Awake() { if (Instance != null) { Destroy(this); } Instance = this; m_ControlSystem = new AetherControlSystem(); }
// Update is called once per frame void Update() { Vector2 mouseInput = AetherInput.GetPlayerActions().Look.ReadValue <Vector2>(); float mouseX = mouseInput.x * m_MouseSensitivity * Time.deltaTime; float mouseY = mouseInput.y * m_MouseSensitivity * Time.deltaTime; m_xRot -= mouseY; m_xRot = Mathf.Clamp(m_xRot, -90, 90); transform.localRotation = Quaternion.Euler(m_xRot, 0, 0); m_Player.Rotate(Vector3.up, mouseX); }
private void HandleMovement() { m_LastKnownInput = AetherInput.GetPlayerActions().Move.ReadValue <Vector2>(); Vector3 move = Camera.main.transform.right * m_LastKnownInput.x + Camera.main.transform.forward * m_LastKnownInput.y; move *= Time.deltaTime * m_MoveSpeed; // Slow the player down after a fall if (IsRecoveringFromFall()) { float mod = (Time.time - m_LandingTime) / m_LandingRecoveryTime; move *= Mathf.Lerp(m_LandingSpeedModifier, 1, mod); } m_Velocity = new Vector3(move.x, m_Velocity.y, move.z); }
// Start is called before the first frame update void Start() { m_platformType = PlatformType.PS4_CONTROLLER; // Keyboard Action Call AetherInput.GetUIActions().KeyboardAction.performed += RetrievePlatformTypeCallback; // Mouse Action Calls AetherInput.GetUIActions().ScrollWheel.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().Click.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().MiddleClick.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().RightClick.performed += RetrievePlatformTypeCallback; // Other Bindings AetherInput.GetUIActions().Cancel.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().Navigate.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().Ready.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().Submit.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().Customize.performed += RetrievePlatformTypeCallback; AetherInput.GetUIActions().GetBindings.performed += RetrievePlatformTypeCallback; }
private void BlockIfPossible() { if (m_PlayerStance == null) { return; } m_BlockedInCurrentFrame = false; if (!m_PlayerStance.IsCombatStance()) { return; } if (!m_PlayerStance.CanPerformAction(PlayerStance.Action.ACTION_BLOCK)) { return; } m_BlockedInCurrentFrame = AetherInput.GetPlayerActions().Block.ReadValue <float>() != 0; }
private void Start() { // For test purpose AetherInput.GetPlayerActions().Fire.performed += HandleLaunchMeteor; }
// Start is called before the first frame update void Start() { m_PlayerStance = GetComponent <PlayerStance>(); AetherInput.GetPlayerActions().Fire.performed += AttackInputCallback; AetherInput.GetPlayerActions().Sheathe.performed += SheatheInputCallback; }
void Start() { AetherInput.GetPlayerActions().Jump.performed += HandleJump; m_CharacterController = GetComponent <CharacterController>(); }
public float GetAxisCustom(string axisName) { Vector2 lookDelta = AetherInput.GetPlayerActions().Look.ReadValue <Vector2>(); return(axisName == "Mouse X" ? lookDelta.x : lookDelta.y); }
void Start() { m_EventSystem = EventSystem.current; AetherInput.GetUIActions().Cancel.performed += SwitchMultiplayMenuBarsCallback; AetherInput.GetUIActions().Cancel.performed += SwitchOptionsMenuCallback; }
public Vector2 GetInputAxis() { return(AetherInput.GetPlayerActions().Move.ReadValue <Vector2>()); }