Branch() public method

public Branch ( ) : bool
return bool
Ejemplo n.º 1
0
 void OnMouseUp()
 {
     if (verbose)
     {
         Debug.Log("OnMouseUp() entered");
     }
     pts.Branch();
 }
    void OnCollisionEnter(Collision c)
    {
        //ignore collisions from another tree segment
        if (c.gameObject.GetComponent <ProceduralTreeSegment>() != null)
        {
            return;
        }

        if (verbose)
        {
            Debug.Log("collision hit");
        }

        //c.transform.renderer.material.color = Color.red;

        //Debug.Log("Collided with type " + c.GetType());

        if (ts.Branch())
        {
            Destroy(transform.rigidbody);
        }
    }