LuaDocs/Scene
From Data Realms Wiki
(Scene - Automatically generated by LuaBot) |
(Scene - Automatically generated by LuaBot) |
||
Line 35: | Line 35: | ||
==Functions== | ==Functions== | ||
+ | ===HasArea=== | ||
+ | Checks for the existence of a specific Area identified by a name. This won't throw any errors to the console if the Area isn't found. | ||
+ | |||
+ | '''Arguments:''' | ||
+ | |||
+ | * The name of the Area to try to find in this Scene. | ||
+ | |||
+ | '''Return value:''' | ||
+ | |||
+ | Whether the specified area is defined in this Scene. | ||
+ | |||
+ | |||
===GetArea=== | ===GetArea=== | ||
Gets a specific Area identified by a name. Ownership is NOT transferred! | Gets a specific Area identified by a name. Ownership is NOT transferred! |
Revision as of 22:59, 10 May 2011
Contents |
Parent: Entity
Concrete Class. Contains everything that defines a complete scene.
Properties
ClassName
The class name of this Entity.A string with the friendly-formatted type name of this object.
Location
The specified location of this scene on the planet viewA Vector showing the location of this scene on the planet view.
Dimensions
Read-only property. The total dimensions (width and height) of the scene, in pixels.A Vector describing the scene dimensions.
Width
Read-only property. The total width of the scene, in pixels.An int describing the scene width.
Height
Read-only property. The total height of the scene, in pixels.An int describing the scene width.
WrapsX
Read-only property. Indicates whether the scene wraps its scrolling around the X axis.Whether the scene wraps around the X axis or not.
WrapsY
Read-only property. Indicates whether the scene wraps its scrolling around the Y axis.Whether the scene wraps around the Y axis or not.
GlocalAcc
Read-only property. The global acceleration (in m/s^2) that is applied to all movable objects' velocities during every frame. Typically models gravity.A Vector describing the global acceleration.
Functions
HasArea
Checks for the existence of a specific Area identified by a name. This won't throw any errors to the console if the Area isn't found.
Arguments:
- The name of the Area to try to find in this Scene.
Return value:
Whether the specified area is defined in this Scene.
GetArea
Gets a specific Area identified by a name. Ownership is NOT transferred!
Arguments:
- The name of the Area to try to get.
Return value:
A pointer to the Area asked for. 0 if no Area of that name was found.
WithinArea
Checks if a point is within a specific named Area of this Scene. If no Area of the name is found, this just returns false without error.
Arguments:
- The name of the Area to try to check against.
- The point to see if it's within the specified Area.
Return value:
Whether any Area of that name was found, AND the point falls within it.