using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MapTile : MonoBehaviour {

	public Map.Vector2Int Coordinates { get; private set; }
	public MeshRenderer Renderer = null;
	public MapTile TileParent;

	public bool IsObstacle = false;
	public int GCost;
	public int HCost;

	public int fCost {
		get {
			return GCost + HCost;
		}
	}

	public void Init(int x, int y)
	{
		Coordinates = new Map.Vector2Int (x, y);

		Renderer = gameObject.GetComponent<MeshRenderer> ();

		if (Renderer == null)
			Renderer = gameObject.AddComponent<MeshRenderer> ();
	}
}
