Example #1
0
    //Checks whether all key pins are locked by tension at the shear line.
    //Note: Key pins are the bronze cylinders that prevent the key plug from turning.
    //The Shear line is the line that separates the key plug from the rest of the lock (shell). Severing the Key Pin link between the key plug and key shell allows the lock to turn.
    private void CheckVictory()
    {
        if (!m_Pin_Manager_Ref)
        {
            Debug.LogError("[Error] PinManager.cs reference missing! Aborting operation...");
            return;
        }

        if (m_Pin_Manager_Ref.AreAllPinsLocked())
        {
            VictorySequence();
        }
    }