/// <summary> /// Deletes the tile that is at the direction given by methodDirection. /// Can be used to screw up a map, so don't do that /// </summary> public void deleteTile() { //Debug.Log("deleteTile() does not do anything right now"); getCurrentNode(); // make sure node copy is current getCurrentMap(); // make sure map reference is current int tempIndex = currentNode[(int)methodDirection]; // get the node that this one connects to in that direction if (tempIndex >= 0) // can only delete that node if it exists { LevelEditor_2.deleteTile(currentMap, tempIndex); LevelEditor_2.cleanUpMap(currentMap); // clean up the node array inside map, so that it doesn't have gaps in the array. } else { Debug.Log("Error: There is no node the " + methodDirection.ToString() + "-ern direction"); } getCurrentNode(); // node copy now out of date, update it GameManager.gameplay.nonEuclidRenderer.HandleRender(GameManager.Direction.East, currentNode, false); // draw changes to map }