コード例 #1
0
 static public int CheckPosition(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         OzTouchInput        self = (OzTouchInput)checkSelf(l);
         UnityEngine.Vector2 a1;
         checkType(l, 2, out a1);
         var ret = self.CheckPosition(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #2
0
 static public int set_mouseWheelSpeed(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         OzTouchInput  self = (OzTouchInput)checkSelf(l);
         System.Single v;
         checkType(l, 2, out v);
         self.mouseWheelSpeed = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #3
0
 static public int SetRetrictArea(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         OzTouchInput self = (OzTouchInput)checkSelf(l);
         ScreenArea   a1;
         a1 = (ScreenArea)LuaDLL.luaL_checkinteger(l, 2);
         self.SetRetrictArea(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #4
0
 static public int Get_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.GameObject a1;
         checkType(l, 1, out a1);
         var ret = OzTouchInput.Get(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #5
0
 public static void RegisterTouchInput(OzTouchInput input)
 {
     if (list.Contains(input) == false)
     {
         list.Add(input);
     }
 }
コード例 #6
0
    static public OzTouchInput Get(GameObject go)
    {
        OzTouchInput listener = go.GetComponent <OzTouchInput>();

        if (listener == null)
        {
            listener = go.AddComponent <OzTouchInput>();
        }
        return(listener);
    }
コード例 #7
0
 static public int set_backButtonEventHandler(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         OzTouchInput  self = (OzTouchInput)checkSelf(l);
         System.Action v;
         int           op = checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.backButtonEventHandler = v;
         }
         else if (op == 1)
         {
             self.backButtonEventHandler += v;
         }
         else if (op == 2)
         {
             self.backButtonEventHandler -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #8
0
 public static bool CheckPosition(OzTouchInput target, Vector2 pos)
 {
     if (target == null)
     {
         return(false);
     }
     foreach (OzTouchInput input in list)
     {
         if (input == null)
         {
             continue;
         }
         if (input == target)
         {
             continue;
         }
         if (input.CheckPosition(pos))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #9
0
 public static void UnregisterTouchInput(OzTouchInput input)
 {
     list.Remove(input);
 }