public void Init() { grid = GridBase.singleton; Vector3 worldPos = grid.GetWorldCoordinatesFromTile(2, 2 / 2, 4); curUnit.transform.position = worldPos; GameObject go = new GameObject(); go.name = "line vis"; pathVis = go.AddComponent <LineRenderer>(); pathVis.startWidth = 0.2f; pathVis.endWidth = 0.2f; }
void Awake() { singleton = this; }
private void Awake() { singleton = this; }