Example #1
0
    void FixedUpdate()
    {
        if (loveArrowIsStopping)
        {
            tapToMovePluto tapCtrl = player.GetComponent <tapToMovePluto>();
            tapCtrl.setCanMove(false);
            Vector3 currentVelocity = gameObject.GetComponent <Rigidbody> ().velocity;

            /*			if ((currentVelocity.x > 0) || (currentVelocity.z > 0)) {
             *      gameObject.GetComponent<Rigidbody> ().velocity = new Vector3 (0, 0, 0);
             * }*/

            if ((Time.time) > (loveArrowStopLength + loveArrowStartTime))
            {
                loveArrowIsStopping = false;
                tapCtrl.setCanMove(true);
            }
        }
    }
	// Use this for initialization
	void Start () {
		tapToMove = GameObject.FindGameObjectWithTag ("Player").GetComponent<tapToMovePluto> ();
	}
Example #3
0
 // Use this for initialization
 void Start()
 {
     tapToMove = GameObject.FindGameObjectWithTag("Player").GetComponent <tapToMovePluto> ();
 }