InputAxisScrollbar.cs 336 B

1234567891011121314151617
  1. using System;
  2. using UnityEngine;
  3. namespace UnityStandardAssets.CrossPlatformInput
  4. {
  5. public class InputAxisScrollbar : MonoBehaviour
  6. {
  7. public string axis;
  8. void Update() { }
  9. public void HandleInput(float value)
  10. {
  11. CrossPlatformInputManager.SetAxis(axis, (value*2f) - 1f);
  12. }
  13. }
  14. }