Difference between revisions of "Class Module"
From SolarStrike wiki
m |
|||
Line 1: | Line 1: | ||
+ | See also: [[Classes]] | ||
+ | |||
== new == | == new == | ||
'''class class.new([class baseclass])''' | '''class class.new([class baseclass])''' |
Revision as of 19:29, 2 July 2014
See also: Classes
new
class class.new([class baseclass])
Create a new class. If baseclass is given, creates a child of it, and set the 'parent' variable to its base.
This will not call the constructor. That is what the __call operator on the returned class is for: to create an instance of the class.
vector3d
vector3d class.vector3d([number x, number y, number z])
Create a new table (class) of vector3d. If x, y and z are given, the new vector3d retains the given values.
The vector3d class contains metamethods for operations such as vector scaling and dot product.
See also: Vector3d Class