Example #1
0
        public void UpdateLevelStepCount(int level, int stepCount)
        {
            CompleteLevelInfoVO vo = null;

            foreach (var tempVO in _vo.completeList)
            {
                if (tempVO.level == level)
                {
                    vo = tempVO;
                    break;
                }
            }

            if (null == vo)
            {
                vo = new CompleteLevelInfoVO(level, stepCount);
                _vo.completeList.Add(vo);
            }
            else
            {
                vo.stepCount = stepCount;
            }

            Save();
        }
Example #2
0
        public int GetLevelStepCount(int level)
        {
            CompleteLevelInfoVO vo = null;

            foreach (var tempVO in _vo.completeList)
            {
                if (tempVO.level == level)
                {
                    vo = tempVO;
                    break;
                }
            }

            if (null != vo)
            {
                return(vo.stepCount);
            }

            return(-1);
        }