示例#1
0
    /// <summary>
    /// Lowers the pins that are standing to the floor.
    /// Called from the animator.
    /// </summary>
    public void LowerPins()
    {
        foreach (Pin pin in pins)
        {
            if (pin.IsStanding())
            {
                pin.transform.Translate(Vector3.down * distanceToRaise, Space.World);
                pin.ResetVelocity();
                pin.GetComponent <Rigidbody>().useGravity = true;
            }
        }

        pinCounter.ResetPinsKnockedOverDisplay();
    }