예제 #1
0
 public void CoordinateCreator(Map map)
 {
     XCoor = random.Next(0, 10);
     Thread.Sleep(5);
     YCoor = random.Next(0, 11);
     Thread.Sleep(5);
     int[,] table = map.GenerateMap();
     //while (table[XCoor, YCoor] == 1)
     //{
     //    XCoor = random.Next(0, 10);
     //    YCoor = random.Next(0, 11);
     //}
 }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();
            myfoxDraw = new FoxDraw(canvas);

            Map mymap = new Map(myfoxDraw);

            mymap.GenerateMap();

            Characters mycharacters = new Characters(mymap);

            hero = new Hero(mymap);
            mycharacters.AddCharacter(hero);
            mycharacters.AddCharacter(new Boss(mymap));
            mycharacters.AddCharacter(new Skeletons(true, mymap));
            mycharacters.AddCharacter(new Skeletons(false, mymap));
            mycharacters.AddCharacter(new Skeletons(false, mymap));

            mycharacters.AddImages(myfoxDraw);
        }