Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < musicChannels.Length; ++i)
        {
            musicSource[i].clip = musicChannels[i];
            musicSource[i].Play();
            musicSource[i].loop = true;

            //musicSource[i].volume = 0.0f;
        }

        musicDeathSource.clip = musicDeathChannel;
        musicDeathSource.Play();
        musicDeathSource.loop   = true;
        musicDeathSource.volume = 0.0f;
        //SpookyChip
        distanceManager = FindObjectOfType <PhantomDistance>();
        if (distanceManager != null)
        {
            AgentObject   = distanceManager.AgentReference();
            PhantomObject = distanceManager.PhantomReference();
        }
        else
        {
            Debug.LogWarning("Could not find Distance Manager!");
        }
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     heartbeat       = GetComponent <Heartbeat>();
     distanceManager = FindObjectOfType <PhantomDistance>();
     if (distanceManager != null)
     {
         AgentObject   = distanceManager.AgentReference();
         PhantomObject = distanceManager.PhantomReference();
     }
     else
     {
         Debug.LogWarning("Could not find Distance Manager!");
     }
 }