void Start()
 {
     if (IsEnabled)
     {
         mouseSource = InputSources.Instance.mouse;
     }
     else
     {
         mouseSource = gameObject.AddComponent <InputSourceMouseDisabled>();
     }
 }
示例#2
0
        protected override void InitializeInput()
        {
            InputSource source;

            try
            {
                source = new InputSourceRaw(Window);
            }
            catch
            {
                source = new InputSourceMouse(Window.Mouse);
            }

            InputManager.AddSource(source);
        }
 void Start()
 {
     mouseSource = InputSources.Instance.mouse;
 }