상속: BaseRaycaster
예제 #1
0
 static public int get_depth(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.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.depth);
         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 Raycast(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.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         UnityEngine.EventSystems.PointerEventData a1;
         checkType(l, 2, out a1);
         System.Collections.Generic.List <UnityEngine.EventSystems.RaycastResult> a2;
         checkType(l, 3, out a2);
         self.Raycast(a1, a2);
         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
    public void goToShootMode()
    {
        Debug.Log("inside now spawn a new camera");

        if (shootCameraObject == null)
        {
            shootCamera          = CameraSpawn.AddComponent(typeof(Camera)) as Camera;
            shootCameraObject    = shootCamera.gameObject;
            ShootCameraRayCaster = shootCameraObject.AddComponent(typeof(UnityEngine.EventSystems.PhysicsRaycaster)) as UnityEngine.EventSystems.PhysicsRaycaster;
            //GameObject Bloom = shootCameraObject.AddComponent<Bloom>();
        }
        else
        {
            shootCameraObject.SetActive(true);
        }


        // i should also deactivate all other buttons (buttons in the shop)
        // instantiate more buttons and controllers that controll the camera and offer invoking shooting and a node function call to destroy this camera and then
        // go back to node and normal camera

        canvasChanger.activateShootingCanvas(this.gameObject);

        return;
    }
 static public int set_eventMask(IntPtr l)
 {
     UnityEngine.EventSystems.PhysicsRaycaster o = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
     UnityEngine.LayerMask v;
     checkType(l, 2, out v);
     o.eventMask = v;
     return(0);
 }
예제 #5
0
 /// <summary>
 /// Sets the depth of the camera
 /// </summary>
 public void SetCameraDepth(float depth)
 {
     if (m_Camera == null)
     {
         m_Camera = GetComponent<Camera>();
         m_Raycaster = GetComponent<PhysicsRaycaster>();
     }
     m_Camera.depth = depth;
 }
 static public int get_maxRayIntersections(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         pushValue(l, self.maxRayIntersections);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_eventMask(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.eventMask);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_eventMask(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         pushValue(l, self.eventMask);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int set_eventMask(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         UnityEngine.LayerMask v;
         checkValueType(l, 2, out v);
         self.eventMask = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_maxRayIntersections(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.maxRayIntersections = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Raycast(IntPtr l)
 {
     try {
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         UnityEngine.EventSystems.PointerEventData a1;
         checkType(l, 2, out a1);
         System.Collections.Generic.List <UnityEngine.EventSystems.RaycastResult> a2;
         checkType(l, 3, out a2);
         self.Raycast(a1, a2);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Raycast(IntPtr l)
 {
     try{
         UnityEngine.EventSystems.PhysicsRaycaster self = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
         UnityEngine.EventSystems.PointerEventData a1;
         checkType(l, 2, out a1);
         List <UnityEngine.EventSystems.RaycastResult> a2;
         checkType(l, 3, out a2);
         self.Raycast(a1, a2);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
예제 #13
0
 void Awake()
 {
     m_Camera = GetComponent<Camera>();
     m_Raycaster = GetComponent<PhysicsRaycaster>();
 }
 static public int get_eventMask(IntPtr l)
 {
     UnityEngine.EventSystems.PhysicsRaycaster o = (UnityEngine.EventSystems.PhysicsRaycaster)checkSelf(l);
     pushValue(l, o.eventMask);
     return(1);
 }
예제 #15
0
 void Awake()
 {
     cam = GetComponent<Camera>();
     raycaster = GetComponent<PhysicsRaycaster>();
     layermask = raycaster.eventMask;
 }