예제 #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;
     }
 }
예제 #2
0
 public void UnregisterSnapGrid(SnapGrid grid)
 {
     grids.Remove(grid);
     ReleaseGridMaterialInstance(grid.gridMat);
 }
예제 #3
0
 public void RegisterSnapGrid(SnapGrid grid)
 {
     grids.Add(grid);
     grid.gridMat = CreateGridMaterialInstance();
 }