bool GenerateTarget()
        {
            var targetDepth = (int)_template.TargetDepth.NextValue();

            _rootRoom     = _template.CreateStart(0);
            _rootRoom.Pos = new Point(0, 0);
            _collision.Add(_rootRoom);
            _rooms.Add(_rootRoom);

            if (GenerateTargetInternal(_rootRoom, 1, targetDepth))
            {
                _minRoomNum = targetDepth * _template.NumRoomRate.Begin;
                _maxRoomNum = targetDepth * _template.NumRoomRate.End;
                _maxDepth   = _rooms.Count;
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        private bool GenerateTarget()
        {
            var targetDepth = (int)template.TargetDepth.NextValue();

            rootRoom     = template.CreateStart(0);
            rootRoom.Pos = new Point(0, 0);
            collision.Add(rootRoom);
            rooms.Add(rootRoom);

            if (!GenerateTargetInternal(rootRoom, 1, targetDepth))
            {
                return(false);
            }
            minRoomNum = targetDepth * template.NumRoomRate.Begin;
            maxRoomNum = targetDepth * template.NumRoomRate.End;
            maxDepth   = rooms.Count;
            return(true);
        }