| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
pygame.sprite.Sprite --+
|
Panel.Panel --+
|
Slide
The basic building blocks of myst games.
A typical slide represents a location the player can visit in the game world. Some slides may also represent items or switches that the player can interact with.
Every Slide has its own image file in the game world. When the player encounters the Slide, he is presented with this image. The player clicks on parts of the slide in order to perform certain actions. These parts of the slide are called Hotspots.
As a subclass of Panel, the Slide class resembles both the Sprite and Group classes of Pygame. As Sprites, they can blit an image to the screen, but as Groups, they can manage the behavior of other Sprites that are nested within them. Typically, Hotspots are the only Sprites nested within Slides, but it is possible to store other types of Sprites, such as Text, Movies, and even other Slides.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Inherited from Panel.Panel | |||
|---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| string |
|
||
|
|||
|
|||
|
|||
|
|||
__metaclass__ = Table
|
|||
file = property(_getFile, _setFile)
|
|||
ambiencefile = property(_getAmbiencefile, _setAmbiencefile)
|
|||
| Inherited from Panel.Panel | |||
|---|---|---|---|
cursorDefault = 'default.png'
|
|||
|
|||
|
loaded Whether the player has loaded the slide's image file in the current game session. |
|||
|
links All Hotspots that link to this slide when clicked. |
|||
|
visited Whether the player has previously visited the slide. |
|||
| Inherited from Panel.Panel | |||
|---|---|---|---|
|
enabled Whether draw(), highlight(), and click() functions of the slide should be called by the parent panel. |
|||
|
onEnter The function that is called when the player enters the slide. |
|||
|
onExit The function that is called when the player exits the slide. |
|||
|
|||
|
Inherited from |
|||
|
|||
Creates a slide. Parameters:
|
The portion of the screen occupied by the slide. rect coordinates are determined by rectRel. If a coordinate in rectRel is None, the coordinate is determined by the slide's image size.
|
The portion of the screen occupied by the slide. rect coordinates are determined by rectRel. If a coordinate in rectRel is None, the coordinate is determined by the slide's image size.
|
The name of the image file displayed by the Slide. Resets self.loaded to False |
The name of the sound file that is played in a loop when the player reaches the slide. If none is specified, it returns the default for the slide's stage. |
Draws the slide's image to screen, then draws any sprites within the Slide.
|
Called when the user enters the Slide.
|
Called when the user exits the Slide.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jan 20 14:56:50 2010 | http://epydoc.sourceforge.net |