예제 #1
0
        public static DifficultyModel Instance()
        {
            if (_instance == null)
            {
                _instance = new DifficultyModel();
            }

            return(_instance);
        }
예제 #2
0
        public float getMoveTime(NodeVO node)
        {
            float moveTime = DifficultyModel.Instance().moveTime;

            if (node.HasFlag(NodeVO.SPECIALS_SPEEDUP_UP))
            {
                if (directionIdx == NodeVO.DIRECTION_UP_IDX)
                {
                    moveTime /= 2;
                }

                if (directionIdx == NodeVO.DIRECTION_DOWN_IDX)
                {
                    moveTime *= 2;
                }
            }

            if (node.HasFlag(NodeVO.SPECIALS_SPEEDUP_RIGHT))
            {
                if (directionIdx == NodeVO.DIRECTION_RIGHT_IDX)
                {
                    moveTime /= 2;
                }

                if (directionIdx == NodeVO.DIRECTION_LEFT_IDX)
                {
                    moveTime *= 2;
                }
            }

            if (node.HasFlag(NodeVO.SPECIALS_SPEEDUP_DOWN))
            {
                if (directionIdx == NodeVO.DIRECTION_DOWN_IDX)
                {
                    moveTime /= 2;
                }

                if (directionIdx == NodeVO.DIRECTION_UP_IDX)
                {
                    moveTime *= 2;
                }
            }

            if (node.HasFlag(NodeVO.SPECIALS_SPEEDUP_LEFT))
            {
                if (directionIdx == NodeVO.DIRECTION_LEFT_IDX)
                {
                    moveTime /= 2;
                }

                if (directionIdx == NodeVO.DIRECTION_RIGHT_IDX)
                {
                    moveTime *= 2;
                }
            }
            return(moveTime);
        }