Exemplo n.º 1
0
    IEnumerator ChildDestruct()
    {
        yield return(null);

        if (childLaser)
        {
            childLaser.SendMessage("ChildDestruct");
        }
        float alpha = 0.5f;

        while (alpha > 0)
        {
            alpha -= 0.05f;
            mLineRenderer.material.SetColor("_TintColor", new Color(1f, 1f, 1f, alpha));
            yield return(new WaitForSeconds(Time.deltaTime));
        }
        Destroy(this.gameObject);
    }
Exemplo n.º 2
0
 public void SetParent(BouncingLaser bouncingLaser)
 {
     this.parentLaser = bouncingLaser;
     parentLaser.SendMessage("SetChildLaser", this);
 }
Exemplo n.º 3
0
 IEnumerator ParentDestruct()
 {
     parentLaser.SendMessage("Destruct", this);
     yield return(null);
 }