Exemplo n.º 1
0
 private void Move(int diffX, int diffY)
 {
     if (_map.TileExists(_location.X + diffX, _location.Y + diffY))
     {
         var movementTargetTile = _map.GetTile(_location.X + diffX, _location.Y + diffY);
         if (movementTargetTile.CanPlayerEnterTile())
         {
             _location = movementTargetTile;
         }
         else
         {
             movementTargetTile.Bump();
         }
     }
 }
Exemplo n.º 2
0
 public void Teleport(TileView _tileView)
 {
     _location = _tileView;
     this.transform.position = _location.transform.position;
 }