Пример #1
0
    void Start()
    {
        //if its the ray balloons, we have to initialize it with a color
        if (Idballoon == "theray")
        {
            randomRayColor = Random.Range(0, 4);

            if (randomRayColor == 0)
            {
                this.renderer.material.mainTexture = redBalloon;
            }
            else
            {
                if (randomRayColor == 1)
                {
                    this.renderer.material.mainTexture = greenBalloon;
                }
                else
                {
                    if (randomRayColor == 2)
                    {
                        this.renderer.material.mainTexture = blueBalloon;
                    }
                    else
                    {
                        if (randomRayColor == 3)
                        {
                            this.renderer.material.mainTexture = yellowBalloon;
                        }
                    }
                }
            }
        }
        //

        //If its the refresher (we have to destroy it cause if not, the user will use it his own benefit benefit forever)
        if (Idballoon == "orange")
        {
            Destroy(this.gameObject, 7);
        }
        //

        //Initialize
        faceManager = this.GetComponentInChildren<FaceManager>();
        menuScript = Camera.mainCamera.GetComponent<MenuManipulator>();
        soundScript = Camera.mainCamera.GetComponent<SoundManager>();
        score = GameObject.FindWithTag("Score");
        scoreScript = score.GetComponent<ScoreManipulator>();
        maxAcc = 0.5f;
        aceleration = -1;
        //
    }
 // Use this for initialization
 void Start()
 {
     scoreScript = score.GetComponent<ScoreManipulator>();
 }
 //
 void Start()
 {
     //Setting Variables
     inStorm = false;
     level = 0;
     soundScript = this.gameObject.GetComponent<SoundManager>();
     soundScript.PlaySound(0, true, 0.1f);
     soundScript.PlaySound(1, true, 0.1f);
     ballonManagerScript = ballonManager.GetComponent<BallonManager>();
     clouds = (GameObject)GameObject.Instantiate(menuDeco);
     clouds.transform.position = cloudsPos.position;
     provisorio = "";
     scoreScript = score.GetComponent<ScoreManipulator>();
 }
 void Start()
 {
     menuScript = Camera.mainCamera.GetComponent<MenuManipulator>();
     score = GameObject.FindWithTag("Score");
     scoreScript = score.GetComponent<ScoreManipulator>();
 }
Пример #5
0
 void Start()
 {
     bManager = balloonsManager.GetComponent<BallonManager>();
     menuScript = Camera.mainCamera.GetComponent<MenuManipulator>();
     scoreScript = score.GetComponent<ScoreManipulator>();
 }