public void Start() { GameObject t = new GameObject(); GameObject.DontDestroyOnLoad(t); _Temp = t.transform; #if !MADFINGER_KEYBOARD_MOUSE TouchControls = new PlayerControlsTouch(this); #endif GamepadControls = new PlayerControlsGamepad(this); #if UNITY_EDITOR || MADFINGER_KEYBOARD_MOUSE PCControls = new PlayerControlsPC(this); #endif #if UNITY_ANDROID && !UNITY_EDITOR MogaControls = new PlayerControlsMoga(this); BlueToothControls = new PlayerControlsBlueTooth(this); #endif if (PlayerControlsDrone.Enabled) { DroneControls = new PlayerControlsDrone(this); } Priority = (int)E_InputPriority.Game; Opacity = E_InputOpacity.Opaque; InputManager.Register(this); }
void UpdateMouseInteractionTouch() { if (Input.GetMouseButtonDown(0) && SysUtils.Screen_lockCursor == false) { //Debug.Log("MouseTouch test"); Vector2 mousepos = new Vector2(Input.mousePosition.x, Input.mousePosition.y); InteractionObject o = PlayerControlsTouch.TouchedInteractionIcon(mousepos); if (o != null) { States.UseObjectDelegate(o); } } }