public void RegisterInputController(InputControllerBase ic)
    {
        if (_activeControllers.Contains(ic))
        {
            return;
        }

        _activeControllers.Add(ic);
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        instance = this;

        if(Application.platform == RuntimePlatform.Android) {
            inputController = new AndroidInputController();
            Debug.Log("Using Android input");
        } else {
            inputController = new PcInputController();
            Debug.Log("Using PC input");
        }

        if(inputController != null) {
            inputController.Start();
        }
    }
Exemplo n.º 3
0
 private void OnServiceLocatorInitialized()
 {
     ServiceLocator.AddService <EventManager>(new EventManager());
     ServiceLocator.AddService <InputControllerBase>(InputControllerBase.CreateInputController());
 }
 public void UnregisterInputController(InputControllerBase ic)
 {
     _activeControllers.Remove(ic);
 }