Skyscraper 2.0
SBS::DoorLock Class Reference

#include <lock.h>

Inheritance diagram for SBS::DoorLock:
Collaboration diagram for SBS::DoorLock:

Public Member Functions

 DoorLock (Object *parent)
 
virtual ~DoorLock ()
 
void SetDirection (bool direction)
 
void SetLocked (int side, int keyid)
 
bool GetSide (const Vector3 &position)
 
bool IsLocked (const Vector3 &position)
 
bool ToggleLock (const Vector3 &position, bool force=false)
 
int GetKeyID ()
 

Private Attributes

bool Direction
 
int Locked
 
int KeyID
 
ObjectParent
 

Detailed Description

Definition at line 45 of file lock.h.

Constructor & Destructor Documentation

◆ DoorLock()

SBS::DoorLock::DoorLock ( Object * parent)

Definition at line 76 of file lock.cpp.

References Direction, KeyID, Locked, and Parent.

◆ ~DoorLock()

virtual SBS::DoorLock::~DoorLock ( )
inlinevirtual

Definition at line 49 of file lock.h.

Member Function Documentation

◆ GetKeyID()

int SBS::DoorLock::GetKeyID ( )

Definition at line 195 of file lock.cpp.

References KeyID.

◆ GetSide()

bool SBS::DoorLock::GetSide ( const Vector3 & position)

Definition at line 165 of file lock.cpp.

References Direction, SBS::Object::GetPosition(), and Parent.

Referenced by IsLocked(), and ToggleLock().

Here is the call graph for this function:

◆ IsLocked()

bool SBS::DoorLock::IsLocked ( const Vector3 & position)

Definition at line 178 of file lock.cpp.

References GetSide(), and Locked.

Referenced by SBS::Door::Open().

Here is the call graph for this function:

◆ SetDirection()

void SBS::DoorLock::SetDirection ( bool direction)

Definition at line 86 of file lock.cpp.

References Direction.

Referenced by SBS::Door::FinishDoor().

◆ SetLocked()

void SBS::DoorLock::SetLocked ( int side,
int keyid )

◆ ToggleLock()

bool SBS::DoorLock::ToggleLock ( const Vector3 & position,
bool force = false )

Definition at line 106 of file lock.cpp.

References SBS::SBS::CheckKey(), SBS::ObjectBase::GetRoot(), GetSide(), KeyID, Locked, Parent, SBS::ObjectBase::Report(), SBS::ObjectBase::ReportError(), and SBS::ToString().

Referenced by SBS::Door::OnClick().

Here is the call graph for this function:

Member Data Documentation

◆ Direction

bool SBS::DoorLock::Direction
private

Definition at line 58 of file lock.h.

Referenced by DoorLock(), GetSide(), and SetDirection().

◆ KeyID

int SBS::DoorLock::KeyID
private

Definition at line 60 of file lock.h.

Referenced by DoorLock(), GetKeyID(), SetLocked(), and ToggleLock().

◆ Locked

int SBS::DoorLock::Locked
private

Definition at line 59 of file lock.h.

Referenced by DoorLock(), IsLocked(), SetLocked(), and ToggleLock().

◆ Parent

Object* SBS::DoorLock::Parent
private

Definition at line 61 of file lock.h.

Referenced by DoorLock(), GetSide(), and ToggleLock().


The documentation for this class was generated from the following files: