Bitfighter
021
The Bitfighter Lua Documentation - Robots, Levelgens, and Plugins
|
Points represent an xy coordinate pair or a vector with an x and y component. They are constructed as tables in Lua, but can be used like classes. See the point class for further details.
Note that unlike other Bitfighter classes, points are not capitalized for historical reasons.
Geometry is not a formal datatype, but rather a reference to either to a point or a table of points, depending on the context. For example, if the object is inherently point-like (such as an Item or Projectile), then geometry is a point. For more complex objects (such as a WallItem or a Zone), geometry refers to a Lua table of points.
Some objects have a specific number of points. A TextItem, for example, consists of exactly two points, defining its start and endpoints. Some items (like Zones and PolyWalls ) must have a minimum of three points. See the documentation for individual items for details.
The Geom class provides a collection of tools to make common transformations to a point or a table of points.
bool - Either true
or false
. In Lua, both nil and false make a condition false; any other value makes it true.
int - A number that has no decimal component. Unlike some languages, Lua does not distinguish between integers and floating point numbers – they are both stored internally as numbers. When a function requires an integer argument, and you provide a floating point number, the fraction will be silently dropped.
num - A integer or real (double-precision floating-point) number.