Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class CellPoint : MonoBehaviour {
- // Each cell contains data about what kind of structure is built on it
- private int x, z;
- private CellType currentCellType = CellType.Empty;
- private bool _occupied;
- private Transform _cellBuilding;
- public GameObject relatedStructure;
- public void SetCellCords(int newX, int newZ) {
- x = newX;
- z = newZ;
- }
- public int GetCellX() { return x; }
- public int GetCellZ() { return z; }
- public void SetCellType(CellType newCellType) {
- currentCellType = newCellType;
- }
- public CellType GetCurrentCellType() {
- return currentCellType;
- }
- public bool IsEmpty() {
- return currentCellType == CellType.Empty;
- }
- }
- public enum CellType {
- Empty,
- Road,
- Structure,
- None
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement