Branch() public method

public Branch ( ) : bool
return bool
Exemplo n.º 1
0
    void OnCollisionEnter(Collision c)
    {
        //ignore collisions from another tree segment
        if (c.gameObject.GetComponent <TreeSegment>() != 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);
        }
    }
Exemplo n.º 2
0
 void OnMouseOver()
 {
     ts.Branch();
 }