Ejemplo n.º 1
0
    void ProcessInput()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical   = Input.GetAxis("Vertical");

        m_MainSpaceshipBehaviour.Move(moveHorizontal, moveVertical);

        if (Input.GetButton("Fire1"))
        {
            m_MainSpaceshipBehaviour.UsePrimaryInventorySlot(FireType.DEFAULT);
        }

        if (Input.GetButton("Fire2"))
        {
            m_MainSpaceshipBehaviour.UseSecondaryInventorySlot();
        }
    }