Esempio n. 1
0
    private void OnCollisionEnter(Collision collision)
    {
        GameObject collidedObject = collision.gameObject;
        Branch     branch         = collidedObject.GetComponent <Branch>();

        if (branch)
        {
            Destroy(collidedObject);
            houseManager.BranchDropped(branch.level);
        }
        if (collidedObject.GetComponent <PlayerController>())
        {
            collidingObjects.Add(collidedObject);
        }
    }