示例#1
0
    public void FloorJumpUp()
    {
        //if (Application.isEditor)
        //{

        //    GM.EnterMapId(SaveHeroInfo.CurMapId + 1, true);

        //}
        //else
        //{

        //最高为最高到达的楼层
        if (SaveHeroInfo.CurMapId <= (SaveHeroInfo.ReachFloorIdLimit.y - 1))
        {
            int _tarMapId = SaveHeroInfo.CurMapId + 1 <= 68 ? SaveHeroInfo.CurMapId + 1 : 68;
            //1 第四十四层:id 45 不可直接到达
            if (_tarMapId == 45)
            {
                _tarMapId = 46;
            }

            GM.EnterMapId(_tarMapId, true);
            //音效
            GM.MyCommon.MusicSource[6].Play();
            MessagePart.GetComponentInChildren <Text>().text = "当前楼层 F" + (SaveHeroInfo.CurMapId - 1) + "\n" + "\n" + "您的选择是?";
        }

        //}
    }
示例#2
0
    //void MusicSwitch()
    //{

    //    string _col = "is_music_on";
    //    int _value = Dict.GetInt(Dict.SqlDBName, "system", _col, 1);
    //    //当前为打开
    //    if (_value == 0)
    //    {

    //        Dict.SetInt(Dict.SqlDBName, "system", _col, 1, 1);
    //        ConfigUIBox.GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetChild(1).GetChild(1).GetComponent<Image>().color = new Color(1, 1, 1, 0);
    //        foreach (AudioSource _s in GM.MyCommon.MusicSource)
    //        {

    //            if (_s == GM.MyCommon.MusicSource[7] || _s == GM.MyCommon.MusicSource[8] || _s == GM.MyCommon.MusicSource[9])
    //            {

    //                _s.mute = true;

    //            }

    //        }

    //    }
    //    //当前为关闭
    //    else
    //    {

    //        Dict.SetInt(Dict.SqlDBName, "system", _col, 1, 0);
    //        ConfigUIBox.GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetChild(1).GetChild(1).GetComponent<Image>().color = new Color(1, 1, 1, 1);
    //        foreach (AudioSource _s in GM.MyCommon.MusicSource)
    //        {

    //            if (_s == GM.MyCommon.MusicSource[7] || _s == GM.MyCommon.MusicSource[8] || _s == GM.MyCommon.MusicSource[9])
    //            {

    //                _s.mute = false;

    //            }

    //        }

    //    }

    //}
    //void SoundSwitch()
    //{

    //    string _col = "is_sound_on";
    //    int _value = Dict.GetInt(Dict.SqlDBName, "system", _col, 1);
    //    //当前为打开
    //    if (_value == 0)
    //    {

    //        Dict.SetInt(Dict.SqlDBName, "system", _col, 1, 1);
    //        ConfigUIBox.GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetChild(1).GetChild(2).GetComponent<Image>().color = new Color(1, 1, 1, 0);
    //        foreach (AudioSource _s in GM.MyCommon.MusicSource)
    //        {

    //            if (_s == GM.MyCommon.MusicSource[7] || _s == GM.MyCommon.MusicSource[8] || _s == GM.MyCommon.MusicSource[9])
    //            {

    //                continue;

    //            }
    //            _s.mute = true;

    //        }

    //    }
    //    //当前为关闭
    //    else
    //    {

    //        Dict.SetInt(Dict.SqlDBName, "system", _col, 1, 0);
    //        ConfigUIBox.GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetChild(1).GetChild(2).GetComponent<Image>().color = new Color(1, 1, 1, 1);
    //        foreach (AudioSource _s in GM.MyCommon.MusicSource)
    //        {

    //            if (_s == GM.MyCommon.MusicSource[7] || _s == GM.MyCommon.MusicSource[8] || _s == GM.MyCommon.MusicSource[9])
    //            {

    //                continue;

    //            }
    //            _s.mute = false;

    //        }

    //    }

    //}


    #region 初始化init
    public void FloorJumpDown()
    {
        //if (Application.isEditor)
        //{

        //    GM.EnterMapId(SaveHeroInfo.CurMapId - 1, true);

        //}
        //else
        //{

        //最低为最小到达的楼层
        if (SaveHeroInfo.CurMapId >= (SaveHeroInfo.ReachFloorIdLimit.x - 1))
        {
            //最低0层 但不可用跳跃器到达
            int _tarMapId = SaveHeroInfo.CurMapId - 1 >= 1 ? SaveHeroInfo.CurMapId - 1 : 1;
            //第零层:id 1 第四十四层:id 45 不可直接到达
            if (_tarMapId == 45)
            {
                _tarMapId = 44;
            }

            if (_tarMapId == 1)
            {
                return;
            }

            GM.EnterMapId(_tarMapId, true);
            //音效
            GM.MyCommon.MusicSource[6].Play();
            MessagePart.GetComponentInChildren <Text>().text = "当前楼层 F" + (SaveHeroInfo.CurMapId - 1) + "\n" + "\n" + "您的选择是?";
        }

        //}
    }