Esempio n. 1
0
 private void Awake()
 {
     roomnet   = GetComponentInParent <RoomNetwork>();
     traverser = new RoomTraverser(this, roomnet);
     grid      = GetComponent <SnapGrid>();
     togglable = transform.Find("Togglable")?.gameObject;
     togglable?.SetActive(false);
     insideTransf    = transform.Find("Inside");
     insideColliders = insideTransf.GetComponentsInChildren <Collider>();
     foreach (Collider collider in insideColliders)               // Make sure every "inside collider" is trigger
     {
         collider.isTrigger = true;
     }
 }
Esempio n. 2
0
 public void UnregisterSnapGrid(SnapGrid grid)
 {
     grids.Remove(grid);
     ReleaseGridMaterialInstance(grid.gridMat);
 }
Esempio n. 3
0
 public void RegisterSnapGrid(SnapGrid grid)
 {
     grids.Add(grid);
     grid.gridMat = CreateGridMaterialInstance();
 }