GetCamera() public static method

Return the camera used by EasyTouch for the auto-selection.
public static GetCamera ( int index ) : Camera
index int
return Camera
 public override void OnEnter()
 {
     store.Value = EasyTouch.GetCamera(index.Value).gameObject;
     if (!everyFrame)
     {
         Finish();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 重置EasyTouch的摄像机
        /// </summary>
        private void ResetEasyTouchCameras()
        {
            for (int i = 0; i < EasyTouch.instance.touchCameras.Count; ++i)
            {
                EasyTouch.RemoveCamera(EasyTouch.GetCamera(i));
            }


            EasyTouch.AddCamera(Camera.main, false);
        }
Esempio n. 3
0
 /// <summary>
 /// Transforms touch position into world space, or the center position between the two touches for a two fingers gesture.
 /// </summary>
 /// <returns>
 /// The touch to wordl point.
 /// </returns>
 /// <param name='z'>
 /// The z position in world units from the camera or in world depending on worldZ value
 /// </param>
 /// <param name='worldZ'>
 /// true = r
 /// </param>
 public Vector3 GetTouchToWordlPoint(float z, bool worldZ = false)
 {
     if (!worldZ)
     {
         return(EasyTouch.GetCamera().ScreenToWorldPoint(new Vector3(position.x, position.y, z)));
     }
     else
     {
         return(EasyTouch.GetCamera().ScreenToWorldPoint(new Vector3(position.x, position.y, z - EasyTouch.GetCamera().transform.position.z)));
     }
 }
Esempio n. 4
0
	/// <summary>
	/// Transforms touch position into world space, or the center position between the two touches for a two fingers gesture.
	/// </summary>
	/// <returns>
	/// Vector3 : world position
	/// </returns>
	/// <param name='z'>
	/// The z position in world units from the camera
	/// </param>
	public Vector3 GetTouchToWordlPoint(float z){
		return  EasyTouch.GetCamera().ScreenToWorldPoint( new Vector3( position.x, position.y,z));	
	}
 public override void OnUpdate()
 {
     store.Value = EasyTouch.GetCamera(index.Value).gameObject;
 }