Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (bm.CheckEmpty(row, col))
     {
         OnExplosion();
     }
 }
Ejemplo n.º 2
0
 public void MoveUp(int x, int y)
 {
     if (bm.CheckEmpty(x, y - 1))
     {
         lastPosX    = x;
         lastPosY    = y;
         targetPos.z = transform.position.z + bm.GetGridSize();
         if (y != 0)
         {
             if (amIPlayer1)
             {
                 bm.UpdatePlayerPos(x, y, x, y - 1, BlockType.player);
             }
             else
             {
                 bm.UpdatePlayerPos(x, y, x, y - 1, BlockType.player2);
             }
         }
     }
 }