Package scripts :: Package objects :: Script base :: Class Openable
[hide private]
[frames] | no frames]

Class Openable

source code

object --+        
         |        
BaseObject --+    
             |    
 DynamicObject --+
                 |
object --+       |
         |       |
BaseObject --+   |
             |   |
    Scriptable --+
                 |
                Openable

Adds open() and .close() capabilities to game objects The current state is tracked by the .is_open variable

Instance Methods [hide private]
 
__init__(self, is_open=True, **kwargs)
Init operation for openable objects
source code
 
open(self)
Opens the object, and runs an 'onOpen' script, if present
source code
 
close(self)
Opens the object, and runs an 'onClose' script, if present
source code

Inherited from DynamicObject: __getstate__, __setstate__, getStateForSaving, prepareStateForSaving, restoreState

Inherited from Scriptable: runScript, setScript

Inherited from BaseObject: trueAttr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, is_open=True, **kwargs)
(Constructor)

source code 

Init operation for openable objects

Parameters:
  • is_open (Boolean) - Keyword boolean argument sets the initial state.
Overrides: object.__init__