PinSetter.CheckStanding C# (CSharp) 메소드

CheckStanding() 공개 메소드

public CheckStanding ( ) : void
리턴 void
    void CheckStanding()
    {
        // Update lastStandingCount
        // Call PinHaveSettled() when they have
        int currentStanding = CountStanding();

        if (currentStanding != lastStandingCount) {
            lastChangeTime = Time.time;
            lastStandingCount = currentStanding;
            return;
        }

        float settleTime = 3f; // How long to wait to consider pins settled
        if (Time.time - lastChangeTime > settleTime) { // If last change > 3s ago
            PinHaveSettled();
        }
    }