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

/// <summary>
/// This class creates a Grid Scriptable Object that can be used for node-building.
/// The node size is the length, width and height of each cube for the grid.
/// The grid size is the length, width, and height of the entire grid.
/// Every number on the grid size is a multiple of the node size.
/// All buildable objects will snap to the bottom-most nodes of the grid
/// </summary>

[CreateAssetMenu(fileName = "Grid", menuName = ("GridScript/New Grid"))]
public class GridScript : ScriptableObject {


    public int nodeSize = 10;
    public Vector3 gridSize;

    [SerializeField]Dictionary<Vector3,GridNode> grid = new Dictionary<Vector3,GridNode>();
    [SerializeField]Dictionary<int,GridNode> gridIndexed = new Dictionary<int,GridNode>();
    public Dictionary<Vector3,GridNode> GridBase { get { return grid; } set { grid = value; } }
    public Dictionary<int,GridNode> GridBaseIndexed { get { return gridIndexed; } set { gridIndexed = value; } }
}
