Region object

The Region object allows you to access the properties of your scene's regions. Regions can be queried by using the Scene.GetNode method.


Методы

Point manipulation
AddPoint Adds a new point to the region.
InsertPoint Adds a new point to the region.
SetPoint Changes the coordinates of a point of this region.
RemovePoint Removes point from the region.
GetPoint Queries one point of the region.

Атрибуты

Type (только для чтения) Returns always "region"
Name The internal name of the region
Active Specifies whether the region is active
NumPoints (только для чтения) Returns the number of points of this region
Blocked Specifies whether this region is blocked
Decoration Specifies whether this is the "decoration" region
Scale The scale factor of this region
AlphaColor The alpha color of this region
SaveState Specifies if the region remembers its state after the player leaves the scene

Низкоуровневые события

ActorEntry Some of the actors just entered this region.
ActorLeave Some of the actors just left this region.

AddPoint(X, Y)

Adds a new point to the region.

Параметры

X
The X coordinate of the point
Y
The Y coordinate of the point

Возвращаемое значение

Returns true if the method succeeded.


InsertPoint(Index, X, Y)

Adds a new point to the region.

Параметры

Index
The index where the new point should be inserted
X
The X coordinate of the point
Y
The Y coordinate of the point

Возвращаемое значение

Returns true if the method succeeded.

Примечания

If the index is higher than the number of points already present in the region, this method fails.


SetPoint(Index, X, Y)

Changes the coordinates of a point of this region.

Параметры

Index
The index of the point to be modified
X
New X coordinate of the point
Y
New Y coordinate of the point

Возвращаемое значение

Returns true if the method succeeded.


RemovePoint(Index)

Removes point from the region.

Параметры

Index
The index of the point to be removed

Возвращаемое значение

Returns true if the method succeeded.


GetPoint(Index)

Queries one point of the region.

Параметры

Index
The index of the point to be queried

Возвращаемое значение

Returns an object which provides two properties, X and Y.