public World(int sizeX, int sizeY, Grid grid, TextureCollection a) { blockArray = new Block[sizeX, sizeY]; targetGrid = grid; textures = a; Generate(); AddPlayer(); }
public World(int sizeX, int sizeY, Grid grid, TextureCollection a) { blockArray = new Block[sizeX, sizeY]; targetGrid = grid; textures = a; Generate(); AddPlayer(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //initializes a new world and generates it TextureCollection al = new TextureCollection(); world = new World(Convert.ToInt32(137), Convert.ToInt32(200), gameGrid, al); dtGameTick.Tick += new EventHandler(dtGameTick_Tick); dtGameTick.Interval = new TimeSpan(0, 0, 0, 0, 16); dtGameTick.Start(); Canvas.SetZIndex(canvas_shop, 98); store.Visibility = Visibility.Collapsed; store.VerticalAlignment = System.Windows.VerticalAlignment.Top; store.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; canvas_shop.Background = new ImageBrush(world.textures.assets["shop"]); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //initializes a new world and generates it TextureCollection al = new TextureCollection(); world = new World(Convert.ToInt32(137), Convert.ToInt32(200),gameGrid, al); dtGameTick.Tick += new EventHandler(dtGameTick_Tick); dtGameTick.Interval = new TimeSpan(0, 0, 0, 0, 16); dtGameTick.Start(); Canvas.SetZIndex(canvas_shop, 98); store.Visibility = Visibility.Collapsed; store.VerticalAlignment = System.Windows.VerticalAlignment.Top; store.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; canvas_shop.Background = new ImageBrush(world.textures.assets["shop"]); }