コード例 #1
0
    public void BGMBtnPressed()
    {
        if (m_ManagerScript.GetBGMBool())
        {
            m_ManagerScript.BGM_On_Off(false);
        }
        else
        {
            m_ManagerScript.BGM_On_Off(true);
        }

        if (m_ManagerScript.GetBGMBool())
        {
            m_BGMBtn.GetComponent <Image>().sprite = (Sprite)Resources.Load("Sprite/BGM_On", typeof(Sprite));
        }
        else
        {
            m_BGMBtn.GetComponent <Image>().sprite = (Sprite)Resources.Load("Sprite/BGM_Off", typeof(Sprite));
        }
    }