PowerQuest 0.18.9
IRoom Interface Reference

Detailed Description

Room: Contains functions and data for manipluating Rooms - Eg.

    if ( R.Current.FirstTimeVisited )
        R.Kitchen.ActiveWalkableArea = 2;
    else if ( R.Previous == R.Treehouse )
        Plr.SetPosition(Points.EntryFromTreeHouse);

    E.ChangeRoom(R.Bedroom);

Properties

RoomComponent Instance [get]
 Access to the actual game object component in the scene. More...
 
string Description [get]
 Gets/Sets the name shown to players. More...
 
string ScriptName [get]
 The name used in scripts. More...
 
bool Active [get, set]
 Gets/sets whether this is the current room. Setting this changes the room ( same as C.Player.Room = R.RoomName; ) More...
 
bool Current [get, set]
 Gets/sets whether this is the current room. Setting this changes the room ( same as C.Player.Room = R.RoomName;, or setting room to Active = true. More...
 
bool Visited [get]
 Returns true if the room has ever been visited by the plyaer. More...
 
bool FirstTimeVisited [get]
 Returns true if it's currently the first time the player has visited the room. More...
 
int TimesVisited [get]
 Returns The number of times the room has been visited. More...
 
int ActiveWalkableArea [get, set]
 Gets or sets the index currently active walkable area for the room. These are added in the editor. More...
 
bool PlayerVisible [get, set]
 Gets or sets whether the player character is visisble in this room. More...
 
RectCentered Bounds [get, set]
 Access to the room's bounds. More...
 
RectCentered ScrollBounds [get, set]
 Access to the room's scroll bounds. More...
 
float VerticalResolution [get, set]
 Sets the vertical resolution of this room (How many pixels high the camera view will be). If non-zero, it'll override the default set in PowerQuest. More...
 
float Zoom [get, set]
 Sets the vertical resolution of this room (How many pixels high the camera view will be) as a multiplier of the default vertical resolution set in PowerQuest. For temporary zoom changes use Camera.Zoom. More...
 
Room Data [get]
 Access to the base class with extra functionality used by the PowerQuest. More...
 

Public Member Functions

void EnterBG ()
 Change the current room. Same as calling C.Player.Room = room;. More...
 
Coroutine Enter ()
 Change the current room to this one. Can be yielded too, and blocks until after OnEnterAfterFade of the new room finishes. More...
 
Hotspot GetHotspot (string name)
 Retreives a hotspot by name. More...
 
Prop GetProp (string name)
 Retreives a prop by name. More...
 
Region GetRegion (string name)
 Retreives a region by name. More...
 
Vector2 GetPoint (string name)
 Retreives a position by name. More...
 
void SetPoint (string name, Vector2 location)
 Moves a named room position to another location. More...
 
void SetPoint (string name, string fromPosition)
 Moves a named room position to the location of another named position. More...
 
List< Hotspot > GetHotspots_SaveFlagNotDirtied ()
 Get the room's hotspot. Warning: Any items modified in the returned list MUST have Dirty property set, or save games will break! More...
 
List< Prop > GetProps_SaveFlagNotDirtied ()
 Get the room's prop. Warning: Any items modified in the returned list MUST have Dirty property set, or save games will break! More...
 
GetScript< T > ()
 PowerQuest internal function: Access to the specific quest script for the room. Use the specific room script as the templated parameter so you can access specific members of the script. Eg: GetScript<RoomKitchen>().m_tapOn = true;. More...
 

Property Documentation

◆ Instance

RoomComponent Instance
get

Access to the actual game object component in the scene.

◆ Description

string Description
get

Gets/Sets the name shown to players.

◆ ScriptName

string ScriptName
get

The name used in scripts.

◆ Active

bool Active
getset

Gets/sets whether this is the current room. Setting this changes the room ( same as C.Player.Room = R.RoomName; )

◆ Current

bool Current
getset

Gets/sets whether this is the current room. Setting this changes the room ( same as C.Player.Room = R.RoomName;, or setting room to Active = true.

◆ Visited

bool Visited
get

Returns true if the room has ever been visited by the plyaer.

◆ FirstTimeVisited

bool FirstTimeVisited
get

Returns true if it's currently the first time the player has visited the room.

◆ TimesVisited

int TimesVisited
get

Returns The number of times the room has been visited.

◆ ActiveWalkableArea

int ActiveWalkableArea
getset

Gets or sets the index currently active walkable area for the room. These are added in the editor.

◆ PlayerVisible

bool PlayerVisible
getset

Gets or sets whether the player character is visisble in this room.

◆ Bounds

RectCentered Bounds
getset

Access to the room's bounds.

◆ ScrollBounds

RectCentered ScrollBounds
getset

Access to the room's scroll bounds.

◆ VerticalResolution

float VerticalResolution
getset

Sets the vertical resolution of this room (How many pixels high the camera view will be). If non-zero, it'll override the default set in PowerQuest.

◆ Zoom

float Zoom
getset

Sets the vertical resolution of this room (How many pixels high the camera view will be) as a multiplier of the default vertical resolution set in PowerQuest. For temporary zoom changes use Camera.Zoom.

◆ Data

Room Data
get

Access to the base class with extra functionality used by the PowerQuest.

Member Function Documentation

◆ EnterBG()

void EnterBG ( )

Change the current room. Same as calling C.Player.Room = room;.

◆ Enter()

Coroutine Enter ( )

Change the current room to this one. Can be yielded too, and blocks until after OnEnterAfterFade of the new room finishes.

◆ GetHotspot()

Hotspot GetHotspot ( string  name)

Retreives a hotspot by name.

◆ GetProp()

Prop GetProp ( string  name)

Retreives a prop by name.

◆ GetRegion()

Region GetRegion ( string  name)

Retreives a region by name.

◆ GetPoint()

Vector2 GetPoint ( string  name)

Retreives a position by name.

◆ SetPoint() [1/2]

void SetPoint ( string  name,
Vector2  location 
)

Moves a named room position to another location.

◆ SetPoint() [2/2]

void SetPoint ( string  name,
string  fromPosition 
)

Moves a named room position to the location of another named position.

◆ GetHotspots_SaveFlagNotDirtied()

List< Hotspot > GetHotspots_SaveFlagNotDirtied ( )

Get the room's hotspot. Warning: Any items modified in the returned list MUST have Dirty property set, or save games will break!

◆ GetProps_SaveFlagNotDirtied()

List< Prop > GetProps_SaveFlagNotDirtied ( )

Get the room's prop. Warning: Any items modified in the returned list MUST have Dirty property set, or save games will break!

◆ GetScript< T >()

T GetScript< T > ( )

PowerQuest internal function: Access to the specific quest script for the room. Use the specific room script as the templated parameter so you can access specific members of the script. Eg: GetScript<RoomKitchen>().m_tapOn = true;.

Type Constraints
T :RoomScript<T>