LuaDocs/Scene

From Data Realms Wiki

Revision as of 02:50, 20 August 2009 by LuaBot (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Parent: Entity

Concrete Class. Contains everything that defines a complete scene.

Go back to Class Index


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

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.


Go back to Class Index

Personal tools