Ejemplo n.º 1
0
    void ThrowObject()
    {
        if (!hasPickup)
        {
            return;
        }

        float        actualThrowPower = Mathf.Max(minThrowPower, throwPower);
        PickupObject pickup           = pickedUpObject.GetComponentInParent <PickupObject>();

        pickup.Throw(actualThrowPower, maxThrowPower);
        throwPower     = 0;
        pickedUpObject = null;
        hasPickup      = false;
    }