예제 #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);
    }
예제 #2
0
 public void SetParent(BouncingLaser bouncingLaser)
 {
     this.parentLaser = bouncingLaser;
     parentLaser.SendMessage("SetChildLaser", this);
 }
예제 #3
0
 IEnumerator ParentDestruct()
 {
     parentLaser.SendMessage("Destruct", this);
     yield return(null);
 }