summaryrefslogtreecommitdiff
path: root/scripts/Map.cs
blob: 6bdd4a4d55336462f2fabab0aba9b1b8658ea699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Godot;
using System;

public partial class Map : Node2D
{
	public MapData Map_Data { get; private set; }

	[Export]
	public int Height;
	[Export]
	public int Width;

	private void PlaceTiles() {
		foreach (Tile tile in Map_Data.Tiles) {
			AddChild(tile);
		}
	}

	public override void _Ready()
	{
		base._Ready();

		Map_Data = new MapData(Width, Height);

		PlaceTiles();
	}
}