Exemplo n.º 1
0
    //Enforces custom physics upon the lock pick should a key pin be obstructing the way west bound. This prevents the lock pick from clipping through pins.
    private void DetermineLowerBound()
    {
        if (!m_Pin_Manager_Ref)
        {
            Debug.LogError("[Error] Reference to PinManager.cs missing! Aborting operation...");
            return;
        }
        if (!m_Game_Manager_Ref)
        {
            Debug.LogError("[Error] Reference to GameManager.cs missing! Aborting operation...");
            return;
        }
        if (m_Game_Manager_Ref.GetGameState() != GameState.Lockpicking)
        {
            return;
        }
        if (!m_Pin_Manager_Ref.ArePinsReady())
        {
            Debug.Log("[Notice] Key Pins are not yet ready. Aborting operation...");
            return;
        }

        m_Pick_Movement_Lower_Bound = m_Pin_Manager_Ref.DetermineNewPickLowerBound(m_Pick_Tip_Ref.position.y, m_Pick_Lane);
    }