Exemplo n.º 1
0
    private void AddAudioSource_OnCollected(ACollectable obj)
    {
        if (obj.tag == "Script")
        {
            if (this.source == null)
            {
                searchForSource();
            }
            if (source.clip != clipScript)
            {
                source.clip = clipScript;
            }
            source.Play();
            return;
        }

        if (obj.tag == "Can")
        {
            if (this.source == null)
            {
                searchForSource();
            }
            if (source.clip != clipCan)
            {
                source.clip = clipCan;
            }
            source.Play();
        }
    }
Exemplo n.º 2
0
 protected void checkDamage(ACollectable feature)
 {
     if (feature is DamageBoss1)
     {
         this.gotDamage();
         this.droppedScriptAlive = false;
     }
 }
Exemplo n.º 3
0
    public void ShowFileName(Transform script)
    {
        ACollectable test = script.gameObject.GetComponent <ACollectable>();

        if (test != null)
        {
            if (test.ShouldShowFileName())
            {
                GameObject newGo = Instantiate(prefab);
                newGo.transform.parent               = script;
                newGo.transform.localPosition        = new Vector3(0f, offsetY, 0f);
                newGo.GetComponent <TextMesh>().text = test.GetFilename();
                if (test.transform.name == "GoLeft" || test.transform.name == "CameraFeature")
                {
                    newGo.AddComponent <TextVisualFader>();
                }
            }
        }
    }
Exemplo n.º 4
0
 public void Trigger_Collected(ACollectable collected)
 {
     this.OnCollected?.Invoke(collected);
     this.AfterCollected?.Invoke(collected);
 }