evershade/Assets/Data/ScriptableObjects/Map.cs

20 lines
640 B
C#

using UnityEngine;
[CreateAssetMenu(fileName = "Map", menuName = "Game Data/Map")]
public class Map : ScriptableObject
{
public string sceneName; // The name of the scene this map corresponds to
public Vector3 gridPosition;
public Vector2Int gridSize;
public Vector2Int playerStartPosition;
public Grid grid;
// TODO: we will need some sort of default grid rules that we can apply to each map
// to prevent people from planting crops on the road or in the water, stuff like that.
// public GridRules gridRules;
public void Initialize()
{
grid = CreateInstance<Grid>();
}
}