Exemple #1
0
        public void Draw(ref Graphics g, StageMap stageMap)
        {
            if (tileInfo != null)
            {
                int yAdjust =
                    stageMap.TileHeight - tileInfo.tileImage.Height - stageMap.TileHeight / 2;



                g.DrawImage(tileInfo.tileImage,
                            stageMap.TileWidth * (indexX + indexY) / 2,
                            stageMap.TileHeight * (-indexX + indexY) / 2 + stageMap.GetHeight() / 2 + yAdjust);
            }
        }
Exemple #2
0
        public void CreateMap(decimal X, decimal Y)
        {
            int x = Convert.ToInt32(X);
            int y = Convert.ToInt32(Y);

            string[] tileRoute = new String[tileListBox.Items.Count];
            for (int i = 0; i < tileListBox.Items.Count; i++)
            {
                tileRoute[i] = ((TileInfo)(tileListBox.Items[i])).filePath;
            }
            map = new StageMap(x, y);



            mapPictureBox.Refresh();
        }