Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (m_input.GetChangeColor())
     {
         Debug.Log("change color");
     }
     if (m_input.GetSubmit())
     {
         Debug.Log("submit");
     }
     if (m_input.GetPrevious())
     {
         Debug.Log("previous");
     }
     if (m_input.GetPause())
     {
         Debug.Log("pause");
     }
     if (m_input.GetUp())
     {
         Debug.Log("up");
     }
     if (m_input.GetDown())
     {
         Debug.Log("down");
     }
     if (m_input.GetLeft())
     {
         Debug.Log("left");
     }
     if (m_input.GetRight())
     {
         Debug.Log("right");
     }
 }
Ejemplo n.º 2
0
    // Detects all the inputs that can be made in this screen
    void Update()
    {
        // Directional inputs
        bool up    = m_input.GetUp();
        bool down  = m_input.GetDown();
        bool left  = m_input.GetLeft();
        bool right = m_input.GetRight();

        if (down && (index == 0 || index == 1))
        {
            MoveSelection(2);
        }
        if (up && (index == 2 || index == 3))
        {
            MoveSelection(-2);
        }
        if (left && (index == 1 || index == 3))
        {
            MoveSelection(-1);
        }
        if (right && (index == 0 || index == 2))
        {
            MoveSelection(1);
        }

        // Button inputs
        if (m_input.GetSubmit())
        {
            SelectButton();
        }

        if (m_input.GetPrevious())
        {
            //MenuActions.instance.ChangePanel(SplashScreen);
        }
    }