// Update is called once per frame void Update() { float xAxis = horizontal.IsDown(); if (xAxis > 0.0f) { SwitchRight(); } if (xAxis < 0.0f) { SwitchLeft(); } }
// Update is called once per frame void Update() { if (isSelected) { float yAxis = verticalAxis.IsDown(); if (yAxis > 0.0f) { ScrollUp(); } if (yAxis < 0.0f) { ScrollDown(); } } }