Ejemplo n.º 1
0
 public static void DebugEmptyCell(Core.Cell cell, GizmoType gizmoType)
 {
     if (LayerMask.NameToLayer("EmptyCell") == cell.gameObject.layer)
     {
         DebugCell(cell.GetIndex(), cell.GetGridParent(), DebugsColor.empty_cell, -0.01f);
     }
 }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            if (_cell.transform.hasChanged && _cell.GetGridParent() != null)
            {
                Grid3D grid = _cell.GetGridParent();
                _cell.Initialize(_cell.GetIndex(), grid);
            }
            if (GUILayout.Button("Reset transform"))
            {
                _cell.ResetTransform();
            }
            if (GUILayout.Button("Go parent"))
            {
                Selection.SetActiveObjectWithContext(_cell.transform.parent, null);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Gizmo for debuging the neighbours of a cell.
 /// </summary>
 /// <param name="cell">The cell use to compute neighbours.</param>
 /// <param name="color">Color of the gizmo.</param>
 /// <param name="offsetSize"> The scale amount add to the grid size cell.</param>
 public static void DebugNeigbours(Core.Cell cell, Color color, float offsetSize = 0.01f)
 {
     DebugNeigbours(cell.GetIndex(), cell.GetGridParent(), color, offsetSize);
 }