Ejemplo n.º 1
0
    void Start()
    {
        coincounter = GameObject.Find("Counter").GetComponent <coincounter>();
        pos         = player.transform.position;
        tmp.Set(-4, -0.68f, 0);
        startPosition = target = transform.position;

        //dist = Vector3.Distance(startPosition, pos);
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        beerbool = true;
        //floors = new GameObject[200];
        //this.GetComponent<SpriteRenderer>().sprite = mySprite;
        currentPosition = mySprite.transform.position;
        nextpos         = player.transform.position;
        coincounter     = GameObject.Find("Counter").GetComponent <coincounter>();

        for (int i = 0; i < 100; i++)
        {
            tmpObj           = GameObject.Instantiate(mySprite, currentPosition, Quaternion.identity) as GameObject;
            currentPosition += new Vector3(1f, 0f, 0f);
            // arr[i] = tmpObj;
            tmpObj.AddComponent <floorTmp>();
        }
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     coincounter = GameObject.Find("Counter").GetComponent <coincounter>();
     score       = GameObject.Find("ScoreText").GetComponent <Text>();
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     counter = GameObject.Find("coincounter").GetComponent <coincounter>();
     vidas   = GameObject.Find("Vidas").GetComponent <Text>();
     puntos  = GameObject.Find("Puntos").GetComponent <Text>();
 }