diff --git a/Assets/Raindrop/UI/Pancake.meta b/Assets/Raindrop/UI/Pancake.meta new file mode 100644 index 0000000..54a2843 --- /dev/null +++ b/Assets/Raindrop/UI/Pancake.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0cd74fda30934cccbdb7639eda8a13c4 +timeCreated: 1657640528 \ No newline at end of file diff --git a/Assets/Raindrop/UI/PanAndZoom.cs b/Assets/Raindrop/UI/Pancake/PanAndZoom.cs similarity index 97% rename from Assets/Raindrop/UI/PanAndZoom.cs rename to Assets/Raindrop/UI/Pancake/PanAndZoom.cs index 9ad790f..b141b16 100644 --- a/Assets/Raindrop/UI/PanAndZoom.cs +++ b/Assets/Raindrop/UI/Pancake/PanAndZoom.cs @@ -1,9 +1,9 @@ -using UnityEngine; -using System; +using System; using System.Collections.Generic; +using UnityEngine; using UnityEngine.EventSystems; -namespace Raindrop +namespace Raindrop.UI.Pancake { /// A modular and easily customisable Unity MonoBehaviour for handling swipe and pinch motions on mobile. public class PanAndZoom : MonoBehaviour @@ -36,7 +36,7 @@ namespace Raindrop [Tooltip("Does the script control camera movement?")] public bool controlCamera = true; [Tooltip("The controlled camera, ignored of controlCamera=false")] - public Camera cam; + public UnityEngine.Camera cam; [Header("UI")] [Tooltip("Are touch motions listened to if they are over UI elements?")] @@ -234,7 +234,7 @@ namespace Raindrop if (controlCamera && cameraControlEnabled) { - if (cam == null) cam = Camera.main; + if (cam == null) cam = UnityEngine.Camera.main; cam.transform.position -= (cam.ScreenToWorldPoint(deltaPosition) - cam.ScreenToWorldPoint(Vector2.zero)); } @@ -248,7 +248,7 @@ namespace Raindrop if (controlCamera && cameraControlEnabled) { - if (cam == null) cam = Camera.main; + if (cam == null) cam = UnityEngine.Camera.main; if (cam.orthographic) { diff --git a/Assets/Raindrop/UI/PanAndZoom.cs.meta b/Assets/Raindrop/UI/Pancake/PanAndZoom.cs.meta similarity index 100% rename from Assets/Raindrop/UI/PanAndZoom.cs.meta rename to Assets/Raindrop/UI/Pancake/PanAndZoom.cs.meta diff --git a/Assets/Raindrop/UI/[DEPRECATED]touchInteration/PanAndZoom_MapperModule.cs b/Assets/Raindrop/UI/[DEPRECATED]touchInteration/PanAndZoom_MapperModule.cs index 6b093f2..6ebf6ac 100644 --- a/Assets/Raindrop/UI/[DEPRECATED]touchInteration/PanAndZoom_MapperModule.cs +++ b/Assets/Raindrop/UI/[DEPRECATED]touchInteration/PanAndZoom_MapperModule.cs @@ -5,6 +5,7 @@ using OpenMetaverse; using Plugins.CommonDependencies; using Raindrop.Map.Model; using Raindrop.Services; +using Raindrop.UI.Pancake; using Raindrop.Utilities; using UnityEngine; using UnityEngine.Assertions;