Beispiel #1
0
    /// <summary>
    /// Public function to throw (For now used within the "Throw" animation
    /// </summary>
    public void ThrowObject()
    {
        // Choose a random target point
        int m_point = Random.Range(0, aimPoints_A.Length);

        ProjectileHandler objectData = heldProjectile.GetComponent <ProjectileHandler>();

        objectData.SetThrowingValues(bodyHand.transform.position, rangePower, aimPoints_A[m_point].transform.position);
        heldProjectile.transform.SetParent(null);
        heldProjectile = null;
        anim.SetTrigger("hasThrown");
        throwTimer = 0;
    }