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.
|
|
|
|
|
|
|
|
|
__init__(self,
id,
file,
stage=None,
parent=None,
ambiencefile=None,
rectRel=None,
layer=0,
cursor='',
visible=True,
enabled=True)
Creates a slide. |
source code
|
|
|
|
|
_getImage(self)
The image displayed by the Slide. |
source code
|
|
|
image(self)
The image displayed by the Slide. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
draw(self,
screen)
Draws the slide's image to screen, then draws any sprites within the
Slide. |
source code
|
|
|
enter(self,
oldslide=None,
delay=.1)
Called when the user enters the Slide. |
source code
|
|
|
exit(self,
newslide=None,
delay=.1)
Called when the user exits the Slide. |
source code
|
|
Inherited from pygame.sprite.Sprite :
__repr__ ,
add_internal ,
alive ,
groups ,
kill ,
remove_internal ,
update
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
|
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|