lib/tile.rb in gglib-1.2.1 vs lib/tile.rb in gglib-1.3.0

- old
+ new

@@ -69,12 +69,18 @@ #Returns the width of the tile def height return (@y2-@y1).abs end - #Returns the hiehgt of the tile + #Returns the hieght of the tile def width return (@x2-@x1).abs + end + + #Resize the dimensions of the tile to be w by h units + def resize(w, h) + @x2 = @x1 + w + @y2 = @y1 + h end #Find out if a point is located in the tile, including the edges of the tile def iTile(x,y) return (x>=@x1 and x<=@x2 and y>=@y1 and y<=@y2) \ No newline at end of file