Beispiel #1
0
        /// <inheritdoc />
        protected override void OnDisable()
        {
            mouseHandler.Dispose();
            mouseHandler = null;

            base.OnDisable();
        }
Beispiel #2
0
 private void disableMouse()
 {
     if (mouseHandler != null)
     {
         mouseHandler.Dispose();
         mouseHandler = null;
     }
 }
Beispiel #3
0
        /// <inheritdoc />
        protected override void OnEnable()
        {
            base.OnEnable();

            Debug.LogWarning("[TouchScript] MouseInput is deprecated! Please use StandardInput instead.");

            if (DisableOnMobilePlatforms)
            {
                switch (Application.platform)
                {
                    case RuntimePlatform.Android:
                    case RuntimePlatform.IPhonePlayer:
                    case RuntimePlatform.WP8Player:
                    case RuntimePlatform.MetroPlayerARM:
                    case RuntimePlatform.MetroPlayerX64:
                    case RuntimePlatform.MetroPlayerX86:
                    case RuntimePlatform.TizenPlayer:
                    case RuntimePlatform.BlackBerryPlayer:
                        // don't need mouse here
                        enabled = false;
                        return;
                }
            }

            mouseHandler = new MouseHandler(Tags, beginTouch, moveTouch, endTouch, cancelTouch);
        }
Beispiel #4
0
 private void enableMouse()
 {
     mouseHandler = new MouseHandler(MouseTags, beginTouch, moveTouch, endTouch, cancelTouch);
     Debug.Log("[TouchScript] Initialized Unity mouse input.");
 }