Ejemplo n.º 1
0
 public void Start()
 {
     AetherInput.GetUIActions().Cancel.performed += ToggleCancelCallback;
     AetherInput.GetUIActions().Customize.performed += ToggleCustomizationCallback;
     AetherInput.GetUIActions().Ready.performed += ToggleReadyCallback;
     AetherInput.GetUIActions().Submit.performed += SubmitInputCallback;
 }
Ejemplo n.º 2
0
 void Start()
 {
     m_PlayerStance = GetComponent <PlayerStance>();
     AetherInput.GetPlayerActions().UseSkill.performed += UseSkillAt;
     AetherInput.GetPlayerActions().SwitchSkills.performed += SwitchSkills;
     m_ItemSkillSlots = new Queue <SkillItem>();
 }
Ejemplo n.º 3
0
 void Start()
 {
     AetherInput.GetPlayerActions().Jump.performed += JumpInputCallback;
     AetherInput.GetPlayerActions().Dodge.performed += DodgeInputCallback;
     m_CharacterController = GetComponent <CharacterController>();
     m_PlayerStance        = GetComponent <PlayerStance>();
     m_PlayerCombatHandler = GetComponent <PlayerCombatHandler>();
 }
Ejemplo n.º 4
0
    private void Awake()
    {
        if (Instance != null)
        {
            Destroy(this);
        }

        Instance        = this;
        m_ControlSystem = new AetherControlSystem();
    }
Ejemplo n.º 5
0
    // 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);
    }
Ejemplo n.º 6
0
    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);
    }
Ejemplo n.º 7
0
    // 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;
    }
Ejemplo n.º 8
0
    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;
    }
Ejemplo n.º 9
0
 private void Start()
 {
     // For test purpose
     AetherInput.GetPlayerActions().Fire.performed += HandleLaunchMeteor;
 }
Ejemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     m_PlayerStance = GetComponent <PlayerStance>();
     AetherInput.GetPlayerActions().Fire.performed += AttackInputCallback;
     AetherInput.GetPlayerActions().Sheathe.performed += SheatheInputCallback;
 }
Ejemplo n.º 11
0
 void Start()
 {
     AetherInput.GetPlayerActions().Jump.performed += HandleJump;
     m_CharacterController = GetComponent <CharacterController>();
 }
Ejemplo n.º 12
0
    public float GetAxisCustom(string axisName)
    {
        Vector2 lookDelta = AetherInput.GetPlayerActions().Look.ReadValue <Vector2>();

        return(axisName == "Mouse X" ? lookDelta.x : lookDelta.y);
    }
Ejemplo n.º 13
0
 void Start()
 {
     m_EventSystem = EventSystem.current;
     AetherInput.GetUIActions().Cancel.performed += SwitchMultiplayMenuBarsCallback;
     AetherInput.GetUIActions().Cancel.performed += SwitchOptionsMenuCallback;
 }
Ejemplo n.º 14
0
 public Vector2 GetInputAxis()
 {
     return(AetherInput.GetPlayerActions().Move.ReadValue <Vector2>());
 }