Esempio n. 1
0
        public void LoadMap(FieldGrid grid)
        {
            grid.ClearField();

            foreach (EntityInfo info in _entity)
            {
                switch (info.Type)
                {
                case "Player":
                    grid.LoadPlayer(info.Position.X, info.Position.Y);
                    break;

                case "AI":
                    grid.LoadAI(info.Position.X, info.Position.Y);
                    break;

                case "Block":
                    grid.LoadBlock(info.Position.X, info.Position.Y);
                    break;
                }
            }
        }
Esempio n. 2
0
 private void Clear_Click(object sender, EventArgs e)
 {
     _grid.ClearField();
     Map.Invalidate();
 }