Ejemplo n.º 1
0
        public List <_sDuringLevelProp> DuringLevelProps; // 关卡中道具

        //-------------------------------------------------------------------------
        public override void load(EbPropSet prop_set)
        {
            Name = prop_set.getPropString("T_Name").get();
            var prop_state = prop_set.getPropInt("I_State");

            State   = prop_state == null ? DataState.Default : (DataState)prop_state.get();
            LevelNo = prop_set.getPropInt("I_LevelNo").get();
            var prop_playtype = prop_set.getPropInt("I_PlayType");

            PlayType       = prop_playtype == null ? _ePlayType.Default : (_ePlayType)prop_set.getPropInt("I_PlayType").get();
            BulletNum      = prop_set.getPropInt("I_BulletNum").get();
            Ratio          = prop_set.getPropInt("I_Ratio").get();
            LowScore       = prop_set.getPropInt("I_LowScore").get();
            MidScore       = prop_set.getPropInt("I_MidScore").get();
            HighScore      = prop_set.getPropInt("I_HighScore").get();
            FishRequireId  = prop_set.getPropInt("I_FishRequireId").get();
            FishRequireNum = prop_set.getPropInt("I_FishRequireNum").get();
            CdMinute       = prop_set.getPropInt("I_CdMinute").get();
            CdSecond       = prop_set.getPropInt("I_CdSecond").get();
            LevelDesn      = prop_set.getPropString("T_LevelDesn").get();

            PreLevelProps = new List <_sPreLevelProp>();
            for (int i = 1; i <= 3; ++i)
            {
                string         strPreLevelProps      = prop_set.getPropString("T_PreLevelProps" + i.ToString()).get();
                string[]       arrayStrPreLevelProps = strPreLevelProps.Split(';');
                _sPreLevelProp preLevelProp          = new _sPreLevelProp();
                preLevelProp.PropVariety = EbDataMgr.Instance.getData <TbDataSinglePreLevelProp>(int.Parse(arrayStrPreLevelProps[0]));
                preLevelProp.amount      = int.Parse(arrayStrPreLevelProps[1]);
                preLevelProp.IsActive    = string.IsNullOrEmpty(arrayStrPreLevelProps[2]) ? _sPreLevelProp._eIsActive.Default : (_sPreLevelProp._eIsActive) int.Parse(arrayStrPreLevelProps[2]);
            }

            DuringLevelProps = new List <_sDuringLevelProp>();
            for (int i = 1; i <= 3; ++i)
            {
                string            strPreLevelProps      = prop_set.getPropString("T_PreLevelProps" + i.ToString()).get();
                string[]          arrayStrPreLevelProps = strPreLevelProps.Split(';');
                _sDuringLevelProp duringLevelProp       = new _sDuringLevelProp();
                duringLevelProp.PropVariety = EbDataMgr.Instance.getData <TbDataSingleDuringLevelProp>(int.Parse(arrayStrPreLevelProps[0]));
                duringLevelProp.amount      = int.Parse(arrayStrPreLevelProps[1]);
                duringLevelProp.IsActive    = string.IsNullOrEmpty(arrayStrPreLevelProps[2]) ? _sDuringLevelProp._eIsActive.Default : (_sDuringLevelProp._eIsActive) int.Parse(arrayStrPreLevelProps[2]);
            }
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        public override void load(EbPropSet prop_set)
        {
            Name = prop_set.getPropString("T_Name").get();
            var prop_state = prop_set.getPropInt("I_State");
            State = prop_state == null ? DataState.Default : (DataState)prop_state.get();
            LevelNo = prop_set.getPropInt("I_LevelNo").get();
            var prop_playtype = prop_set.getPropInt("I_PlayType");
            PlayType = prop_playtype == null ? _ePlayType.Default : (_ePlayType)prop_set.getPropInt("I_PlayType").get();
            BulletNum = prop_set.getPropInt("I_BulletNum").get();
            Ratio = prop_set.getPropInt("I_Ratio").get();
            LowScore = prop_set.getPropInt("I_LowScore").get();
            MidScore = prop_set.getPropInt("I_MidScore").get();
            HighScore = prop_set.getPropInt("I_HighScore").get();
            FishRequireId = prop_set.getPropInt("I_FishRequireId").get();
            FishRequireNum = prop_set.getPropInt("I_FishRequireNum").get();
            CdMinute = prop_set.getPropInt("I_CdMinute").get();
            CdSecond = prop_set.getPropInt("I_CdSecond").get();
            LevelDesn = prop_set.getPropString("T_LevelDesn").get();

            PreLevelProps = new List<_sPreLevelProp>();
            for (int i = 1; i <= 3; ++i)
            {
                string strPreLevelProps = prop_set.getPropString("T_PreLevelProps" + i.ToString()).get();
                string[] arrayStrPreLevelProps = strPreLevelProps.Split(';');
                _sPreLevelProp preLevelProp = new _sPreLevelProp();
                preLevelProp.PropVariety = EbDataMgr.Instance.getData<TbDataSinglePreLevelProp>(int.Parse(arrayStrPreLevelProps[0]));
                preLevelProp.amount = int.Parse(arrayStrPreLevelProps[1]);
                preLevelProp.IsActive = string.IsNullOrEmpty(arrayStrPreLevelProps[2]) ? _sPreLevelProp._eIsActive.Default : (_sPreLevelProp._eIsActive)int.Parse(arrayStrPreLevelProps[2]);
            }

            DuringLevelProps = new List<_sDuringLevelProp>();
            for (int i = 1; i <= 3; ++i)
            {
                string strPreLevelProps = prop_set.getPropString("T_PreLevelProps" + i.ToString()).get();
                string[] arrayStrPreLevelProps = strPreLevelProps.Split(';');
                _sDuringLevelProp duringLevelProp = new _sDuringLevelProp();
                duringLevelProp.PropVariety = EbDataMgr.Instance.getData<TbDataSingleDuringLevelProp>(int.Parse(arrayStrPreLevelProps[0]));
                duringLevelProp.amount = int.Parse(arrayStrPreLevelProps[1]);
                duringLevelProp.IsActive = string.IsNullOrEmpty(arrayStrPreLevelProps[2]) ? _sDuringLevelProp._eIsActive.Default : (_sDuringLevelProp._eIsActive)int.Parse(arrayStrPreLevelProps[2]);
            }
        }