示例#1
0
        public cShapeOutline[] GetMap(ref cMaze mMaze, Point pPosition, ref cOrientation oPlayerOrientation)
        {
            List<cShapeOutline> solMapShapes = new List<cShapeOutline>();
            cLinePoints[] lpaMazeWalls = mMaze.GetMazeMap();

            foreach (cLinePoints lpLinePoints in lpaMazeWalls)
            {
                solMapShapes.Add(GetAdjustedShape(lpLinePoints.GetPointList(), Color.Black, ShapeTypes.Line));
            }
            solMapShapes.Add(GetAdjustedEllipse(mMaze.GetMazeEnd(), Color.Red));

            if (mMaze.ShowSolution() == true)
                solMapShapes.Add(GetAdjustedSolutionLine(mMaze.GetSolution(), Color.Purple));
            solMapShapes.Add(GetAdjustedArrow(pPosition, oPlayerOrientation.GetCurrentOrientation(), Color.Green));

            return solMapShapes.ToArray();
        }