public void BrickDestroyed(GridCellCoords c) { try { this.grid[c.x, c.y].HasBrick = false; } catch (KeyNotFoundException e) { #if UNITY_EDITOR Debug.LogError("No such index."); Debug.LogError(e.Message); return; #else GameObject.Find("MainHelper").GetComponent<MainHelper>().GetCurrentGame().PauseGame(); InterfaceUpdateEventArgs ev = new InterfaceUpdateEventArgs(InterfaceUpdateReasons.ExceptionThrown, "No such index.", e); EventSystem.FireInterfaceUpdate(this, ev); #endif } finally { --this.totalBricks; } }
public void BrickDestroyed(GridCellCoords c) { try { this.grid[c.x, c.y].HasBrick = false; } catch (KeyNotFoundException e) { #if UNITY_EDITOR Debug.LogError("No such index."); Debug.LogError(e.Message); return; #else GameObject.Find("MainHelper").GetComponent <MainHelper>().GetCurrentGame().PauseGame(); InterfaceUpdateEventArgs ev = new InterfaceUpdateEventArgs(InterfaceUpdateReasons.ExceptionThrown, "No such index.", e); EventSystem.FireInterfaceUpdate(this, ev); #endif } finally { --this.totalBricks; } }
public void SetCoordinates(GridCellCoords c) { this.coordinates.x = c.x; this.coordinates.y = c.y; }