示例#1
0
文件: Field.cs 项目: Sckorn/vercanoid
 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;
     }
 }
示例#2
0
    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;
        }
    }
示例#3
0
 public void SetCoordinates(GridCellCoords c)
 {
     this.coordinates.x = c.x;
     this.coordinates.y = c.y;
 }
示例#4
0
 public void SetCoordinates(GridCellCoords c)
 {
     this.coordinates.x = c.x;
     this.coordinates.y = c.y;
 }