예제 #1
0
    public void Break()
    {
        if (HeldObj)
        {
            PooledObject pooledObj = HeldObj.GetComponent <PooledObject>();

            if (pooledObj)
            {
                pooledObj.ReturnToPool();
            }

            Drop();
        }
    }
예제 #2
0
    public void SetHeldObject(GameObject h)
    {
        if (h == null)
        {
            HeldObj = null;
        }
        else
        {
            HeldObj = h;
            Target  = null;
        }

        if (HeldObj != null)
        {
            HeldObj.GetComponent <Outline>().eraseRenderer = true;
        }
    }