Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        if (GameObject.FindGameObjectsWithTag("WORLD").Length > 0)
        {
            WorldScript world = GameObject.FindGameObjectsWithTag("WORLD")[0].GetComponent <WorldScript>();
            world.AddAlpaca(this);
        }

        if (GameObject.Find("MusicTime") != null)
        {
            music = GameObject.Find("MusicTime").GetComponent <AudioSource>();
        }

        if (music != null)
        {
            music.volume = 0.3f;
        }

        dest_y = -100;

        Vector3 tmp = GetCurrAlpacaLocation();

        tmp.y -= OFFSET;
        gameObject.transform.position = tmp;
    }