void Start()
    {
        obj = this.gameObject;

        stateObj = GameObject.Find("GlobalState");
        state    = stateObj.GetComponent <globalState>();



        randomSpeedGenerator();
    }
Esempio n. 2
0
    void Start()
    {
        basePlatform = this.gameObject;
        stateObj     = GameObject.Find("GlobalState");
        state        = stateObj.GetComponent <globalState>();
        setLevelDifficulty();


        for (int i = 0; i < lenght; i++)
        {
            Vector2    oldPos      = new Vector2(basePlatform.transform.position.x + randPlatformXLocation(), basePlatform.transform.position.y + 2 * (i + platformDistance));
            GameObject newPlatform = Instantiate(Resources.Load(randPlatformChooser()), oldPos, basePlatform.transform.rotation) as GameObject;
            platformList.Add(newPlatform); //Not used
        }
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     TheOne = this;
 }