コード例 #1
0
    public void ToggleWearingGasMask()
    {
        m_wearingGasMask = !m_wearingGasMask;

        m_gasMask.SetActive(!m_wearingGasMask);
        m_gasMaskReturn.SetActive(m_wearingGasMask);

        // Toggle player avatar...
        m_playerWalk.ChangeCycleTarget(m_wearingGasMask
            ? m_playerMask.GetComponent <AnimationCycle>()
            : m_playerNormal.GetComponent <AnimationCycle>());
        m_playerMask.SetActive(m_wearingGasMask);
        m_playerNormal.SetActive(!m_wearingGasMask);
    }