public void detectController() { if (Input.GetJoystickNames().Length > 2) { this.input = new IController (); profile = controllerProfile.Controller; controller_conected = true; setControllerDefalts(); setControllers(); } else { this.input = new IKeyboard(); profile = controllerProfile.Keys; controller_conected = false; setKeyDefaults(); } }
public void switchControl(controllerProfile newProfile) { this.profile = newProfile; }