You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GridInfo : MonoBehaviour
{
public TraficRoadType roadType = TraficRoadType.;
public Vector3 up, down, left, right = Vector3.zero;
public bool isPlaceLight = false;
public BuildSystem.PlaceObject placeObject = null;
public void TransData(BuildSystem.Grid grid)
{
if (grid.isPlace)
{
if (grid.roadType == BuildSystem.RoadType.Ten)
{
roadType = TraficRoadType.;
}
else if (grid.roadType == BuildSystem.RoadType.T)
{
if (grid.isHaves[0] != BuildSystem.DirIsHaveRoad.Yes)
{
roadType = TraficRoadType.downT;
}
else if (grid.isHaves[2] != BuildSystem.DirIsHaveRoad.Yes)
{
roadType = TraficRoadType.upT;
}
else if (grid.isHaves[3] != BuildSystem.DirIsHaveRoad.Yes)
{
roadType = TraficRoadType.rightT;
}
else if (grid.isHaves[1] != BuildSystem.DirIsHaveRoad.Yes)
{
roadType = TraficRoadType.leftT;
}
}
up = grid.placeObject.transform.GetChild(0).position;
down = grid.placeObject.transform.GetChild(1).position;
left = grid.placeObject.transform.GetChild(2).position;
right = grid.placeObject.transform.GetChild(3).position;
placeObject = grid.placeObject;
}
}
}