Example #1
0
    void ActivateSequencesAnimation()
    {
        numOfSequensesForAnimation = queueAnimations.Dequeue();
        print("numOfSequensesForAnimation " + numOfSequensesForAnimation);
        if (numOfSequensesForAnimation != 0)
        {
            PointsAnimation sequencesAnimation = Resources.Load <PointsAnimation> ("prefabs/AnimationPrefabs/SequencesAnimation");
            string          textToDisplay      = "TextNotInitialized";
            if (numOfSequensesForAnimation == 1)
            {
                textToDisplay = "Double Explosion!";
            }
            if (numOfSequensesForAnimation == 2)
            {
                textToDisplay = "Triple Explosion!";
            }
            if (numOfSequensesForAnimation == 3)
            {
                textToDisplay = "Quadruple Explosion!";
            }
            if (numOfSequensesForAnimation == 4)
            {
                textToDisplay = "Penta Explosion!";
            }
            sequencesAnimation.PointsTextController.text = textToDisplay;
            SequenceAnim = (PointsAnimation)Instantiate(sequencesAnimation, new Vector3(0, 0, 0), Quaternion.identity);
            GameObject animationCanvas = GameObject.FindGameObjectWithTag("AnimationCanvas");
            SequenceAnim.transform.parent = animationCanvas.transform;
            Instantiate(sequenceSound);


            Invoke("destroyAnimation", 3f);
        }
    }
Example #2
0
    public void ActivatePointsAnimation()
    {
        PointsAnimation pointsAnimation = Resources.Load <PointsAnimation>("prefabs/AnimationPrefabs/PointsAnimation");


        pointsAnimation.PointsTextController.text = "+" + score.ToString();

        pointsAnim = (PointsAnimation)Instantiate(pointsAnimation, new Vector3(0, 0, 0), Quaternion.identity);
        GameObject animationCanvas = GameObject.FindGameObjectWithTag("AnimationCanvas");

        pointsAnim.transform.parent = animationCanvas.transform;
    }
Example #3
0
	public  void ActivatePointsAnimation ()
	{
			PointsAnimation pointsAnimation = Resources.Load<PointsAnimation> ("prefabs/AnimationPrefabs/PointsAnimation");
	

			pointsAnimation.PointsTextController.text = "+" + score.ToString ();

			pointsAnim = (PointsAnimation)Instantiate (pointsAnimation, new Vector3 (0, 0, 0), Quaternion.identity);
			GameObject animationCanvas = GameObject.FindGameObjectWithTag ("AnimationCanvas");
			pointsAnim.transform.parent = animationCanvas.transform;
		}	
Example #4
0
	void ActivateSequencesAnimation ()
	{
		VibrationManager.Vibrate(800);

		numOfSequensesForAnimation = queueAnimations.Dequeue ();
		print ("numOfSequensesForAnimation " + numOfSequensesForAnimation);
		if (numOfSequensesForAnimation != 0) {
			PointsAnimation sequencesAnimation = Resources.Load<PointsAnimation> ("prefabs/AnimationPrefabs/SequencesAnimation");
			string textToDisplay="TextNotInitialized";
			if(numOfSequensesForAnimation==1){
				textToDisplay="Double Explosion!";
			}
			if(numOfSequensesForAnimation==2){
				textToDisplay="Triple Explosion!";
			}
			if(numOfSequensesForAnimation==3){
				textToDisplay="Quadruple Explosion!";


			}
			if(numOfSequensesForAnimation==4){
				textToDisplay="Penta Explosion!";

			}
			sequencesAnimation.PointsTextController.text = textToDisplay ;
			SequenceAnim = (PointsAnimation)Instantiate (sequencesAnimation, new Vector3 (0, 0, 0), Quaternion.identity);
			GameObject animationCanvas = GameObject.FindGameObjectWithTag ("AnimationCanvas");
			SequenceAnim.transform.parent = animationCanvas.transform;
			Instantiate (sequenceSound);


			Invoke("destroyAnimation",3f);
		}
	}