PowerQuest 0.19.0
Loading...
Searching...
No Matches
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.
 
string Description [get]
 Gets/Sets the name shown to players.
 
string ScriptName [get]
 The name used in scripts.
 
bool Active [get, set]
 Gets/sets whether this is the current room. Setting this changes the room ( same as C.Player.Room = R.RoomName; )
 
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.
 
bool Visited [get]
 Returns true if the room has ever been visited by the plyaer.
 
bool FirstTimeVisited [get]
 Returns true if it's currently the first time the player has visited the room.
 
int TimesVisited [get]
 Returns The number of times the room has been visited.
 
int ActiveWalkableArea [get, set]
 Gets or sets the index currently active walkable area for the room. These are added in the editor.
 
bool PlayerVisible [get, set]
 Gets or sets whether the player character is visisble in this room.
 
RectCentered Bounds [get, set]
 Access to the room's bounds.
 
RectCentered ScrollBounds [get, set]
 Access to the room's scroll bounds.
 
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.
 
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.
 
Room Data [get]
 Access to the base class with extra functionality used by the PowerQuest.
 

Public Member Functions

void EnterBG ()
 Change the current room. Same as calling C.Player.Room = room;.
 
Coroutine Enter ()
 Change the current room to this one. Can be yielded too, and blocks until after OnEnterAfterFade of the new room finishes.
 
Hotspot GetHotspot (string name)
 Retreives a hotspot by name.
 
Prop GetProp (string name)
 Retreives a prop by name.
 
Region GetRegion (string name)
 Retreives a region by name.
 
Vector2 GetPoint (string name)
 Retreives a position by name.
 
void SetPoint (string name, Vector2 location)
 Moves a named room position to another location.
 
void SetPoint (string name, string fromPosition)
 Moves a named room position to the location of another named position.
 
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!
 
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 > ()
 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;.
 

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>