Пример #1
0
 //-------------------------------------------------------------------------
 void OnFingerDown(FingerDownEvent e)
 {
     if (onFingerDown != null)
     {
         onFingerDown(e.Position);
     }
 }
Пример #2
0
    void OnFingerDown(FingerDownEvent e)
    {
        trail.time = 100;
        startTime = Time.time;

        startPos = e.Finger.Position;
        transform.position = Camera.main.ScreenToWorldPoint(new Vector3(e.Finger.Position.x, e.Finger.Position.y, 1));
    }
	public override void DealOnFingerDown (FingerDownEvent e)
	{
		if ( followWind != null )
		{
			Vector3 touchPosition = Camera.main.ScreenToWorldPoint( e.Position );
			float angle = Vector3.Dot( Vector3.forward , Vector3.Cross( transform.up , touchPosition - transform.position ) );
			followWind.AddImpuse( angle * Time.deltaTime * touchIntense  , touchPosition );
		}
	}
Пример #4
0
	void OnFingerDown(FingerDownEvent e)
	{
		if(!GameController.isGameRunning && !wallTop.enabled)
		{
			OpenPanel();

			if(OnPanelOpening != null)
				OnPanelOpening();
		}
	}
Пример #5
0
	void OnFingerDown( FingerDownEvent e )
	{
		GameObject selection = e.Selection;  
		if (selection == null )
			return;

		SenseGuesture sense = selection.GetComponent<SenseGuesture>();
		if ( sense != null )
			sense.DealOnFingerDown( e );

	}
	void OnFingerDown(FingerDownEvent e)
	{
		if(e.Finger.Index != 0) return;

		fingerDown = true;

		position = e.Position;

		if (OnFingerDownEvent != null)
			OnFingerDownEvent (e);
	}
Пример #7
0
	void OnFingerDown(FingerDownEvent e) {
		Ray ray1 = UICamera.GetComponent<Camera> ().ScreenPointToRay (e.Position);
		RaycastHit hit1;
		if(Physics.Raycast(ray1, out hit1)){
			if(hit1.transform.gameObject.CompareTag("UI")){
			}else{
				if (e.Position.x > 0 && e.Position.y < -e.Position.x + Screen.height && e.Position.y > e.Position.x) {
					//左屏幕
					if(!fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveLeft[0] = 1;
						fingerList.Add(e.Finger,GameController.GetInstance().moveLeft);
					}else if(fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveLeft[0] = 1;
						fingerList[e.Finger] = GameController.GetInstance().moveLeft;
					}
				}else if(e.Position.y > Screen.width - e.Position.x && e.Position.x < Screen.width && e.Position.y < e.Position.x + Screen.height - Screen.width){
					//右屏幕
					if(!fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveRight[0] = 1;
						fingerList.Add(e.Finger,GameController.GetInstance().moveRight);
					}else if(fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveRight[0] = 1;
						fingerList[e.Finger] = GameController.GetInstance().moveRight;
					}
				}else if(e.Position.y > Screen.height - e.Position.x && e.Position.y > Screen.height/2 && e.Position.y > e.Position.x + Screen.height - Screen.width && e.Position.y < Screen.height){
					//上屏幕
					if(!fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveUp[0] = 1;
						fingerList.Add(e.Finger,GameController.GetInstance().moveUp);
					}else if(fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveUp[0] = 1;
						fingerList[e.Finger] = GameController.GetInstance().moveUp;
					}
				}else if(e.Position.y > 0 && e.Position.y < e.Position.x && e.Position.y < Screen.height/2 && e.Position.y < Screen.width - e.Position.x){
					//下屏幕
					if(!fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveDown[0] = 1;
						fingerList.Add(e.Finger,GameController.GetInstance().moveDown);
					}else if(fingerList.ContainsKey(e.Finger)){
						GameController.GetInstance().moveDown[0] = 1;
						fingerList[e.Finger] = GameController.GetInstance().moveDown;
					}
				}
			}
		}

	}
Пример #8
0
 void OnFingerDown( FingerDownEvent e )
 {
     if( e.Selection == fingerDownObject )
         SpawnParticles( fingerDownObject );
 }
 void OnFingerDown( FingerDownEvent e )
 {
     UI.StatusText = string.Empty;
 }
	private void OnFingerDown(FingerDownEvent e)
	{
		//Popup.Hide ();
		//Time.timeScale = 1f;
	}
Пример #11
0
    /// <summary>
    /// 按下时调用 
    /// </summary>
    /// <param name="gesture"></param>
    void OnFingerDown(FingerDownEvent gesture)
    {
        fingerNumber = gesture.Finger.Index;
        //Debug.Log("鼠标按下的点:"+gesture.Finger.StartPosition);
        downPosition = gesture.Finger.StartPosition;
        startPoint3 = map2Sphere(downPosition);
		
		///< 判断是否是键盘区域,键盘区域不能垒方块
        if (false == SunmRTKeyControl.outsideButtonRec(gesture.Position.x, Screen.height - gesture.Position.y)
            || true == SunmRTKeyControl.insideButtonFunctionRec(gesture.Position)) 
        {
            bISAddCube = false;
        }
        
    }
Пример #12
0
	void OnFingerDown(FingerDownEvent e)
	{
		if(Popup.IsActive || !isGameRunning)return;

		if(!isPaused || (isPaused && e.Selection != null && e.Selection.layer == LayerMask.NameToLayer("Tap&Hold")))
			ResumeGame();
	}
Пример #13
0
	void OnFingerDownBack( FingerDownEvent e )
	{
		GameObject selection = e.Selection;
		if ( e.Finger.Phase == FingerGestures.FingerPhase.Begin )
		{
			if ( enabled && m_state == CameraState.Free )
				CreatInk( e.Position , e.Finger );
			else 
				EventManager.Instance.PostEvent( EventDefine.UnableToMove );
		}

	}
 //--------------------------------------------------------------------------
 // Finger Gesture handlers
 //--------------------------------------------------------------------------
 // Continous Gestures
 public void OnFingerDown(FingerDownEvent e)
 {
     _updates.Add(new InputMessage(
         InputMessage.InputTypes.FingerDown,
         InputMessage.MessageTypes.Transient,
         e.Position
     ));
 }
Пример #15
0
 void OnDetectFingerDown(FingerDownEvent e)
 {
     inputActive = true;
     inputOrigin = GetScreenPosition(e.Position);
     inputPosition = inputOrigin;
 }
Пример #16
0
	/// <summary>
	/// 按下时调用 
	/// </summary>
	/// <param name="gesture"></param>
    void OnFingerDown(FingerDownEvent gesture)
	{
		fingerNumber = gesture.Finger.Index;
		downPosition = gesture.Finger.StartPosition;
		
		///< 判断是否是键盘区域,键盘区域不能垒方块
        if (false == SunmRMKeyControl.outsideButtonRec(gesture.Position.x, Screen.height - gesture.Position.y)
         || true == SunmRMKeyControl.insideButtonFunctionRec(gesture.Position))
        {
            bISAddCube = false;
        }
	}
Пример #17
0
 void OnFingerDown( FingerDownEvent e )
 {
     timothy.SendMessage ("TimothyBrake", SendMessageOptions.DontRequireReceiver);
 }
Пример #18
0
 void OnFingerDown( FingerDownEvent e )
 {
     PathRenderer path = paths[e.Finger.Index];
     path.Reset();
     path.AddPoint( e.Finger.Position, fingerDownMarkerPrefab );
 }
Пример #19
0
	public virtual void DealOnFingerDown( FingerDownEvent e )
	{
	}