Class GGLib::Tile
In: tile.rb
Parent: Object

The Tile class represents a rectangular region on the screen. It is synonymous with the Rect structure used in many C programs.

Methods

Attributes

id  [RW]  @@tile = []
inclusive  [RW]  @@tile = []
x1  [RW]  @@tile = []
x2  [RW]  @@tile = []
y1  [RW]  @@tile = []
y2  [RW]  @@tile = []

Public Class methods

Delete all tiles int the program. (Includes classes derived from tiles)

Deletes the tile with the given index

Returns an array of all tiles

Returns the tile with the given index

Find out if the given two tiles intersect.

@inclusive decides whether or not tile edges are considered part of the tile

Override the internal array of tiles with a new one

Public Instance methods

translate the cordinates of the tile so that the center of the tile is at the given point

contains?(x,y)

Alias for isInTile?

Deletes the calling tile

Iterates over all of the encompased by the tile

Iterates over all of the points on the edges of the tile

Returns the width of the tile

Find out if a point is located in the tile, including the edges of the tile

See Tile::intersect?

Find out if a point is located in the tile

Translate the coordinates of the tile so that the thop left corner of the tile is at the given coordinates

Resize the dimensions of the tile to be w by h units

Redefine the tile

Returns the hieght of the tile

Find out if a point is located in the tile, not including the edges of the tile

[Validate]