Package pajammin :: Module iso3d :: Class Iso3dSprite
[show private | hide private]
[frames | no frames]

Type Iso3dSprite

 object --+        
          |        
WorldWidget --+    
              |    
         Sprite --+
                  |
                 Iso3dSprite


A sprite whose screen coordinates and layer are calculated based on its position in world coordinates in such a way as to

A special type of sprite that's used for isometric 3d display. Offset is from the *midbottom* of the sprite!
Method Summary
  __init__(self, category, x, y, animation, on_floor)
  move(self, dx, dy)
  move_to(self, x, y)
    Inherited from Sprite
  __getstate__(self)
  __setstate__(self, state)
  advance_animation(self, ticks)
Advance this sprite's animation by the given number of ticks.
  animation_duration(self, animation)
What is the total time to play the current animation?
  animation_image(self, animation, framenum)
  draw(self, screen, duration, dx, dy)
Draw this widget to the screen.
  draw_scaled(self, surface, dx, dy, scalefac)
  goto_frame(self, framenum)
  has_animation(self, animation)
  num_frames(self)
  restart_animation(self)
Move this sprite's animation to its first frame.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Property Summary
  x: The x position of this sprite's anchor.
  y: The y position of this sprite's anchor.
    Inherited from Sprite
  animation: The name of the animation sequence that is currently used by this sprite.
  category: The name of this sprite's category.
  layer
    Inherited from WorldWidget
  rect: A pygame Rect describing the current position of this sprite's image.

Instance Variable Summary
    Inherited from Sprite
  animation_speed: What speed to advance the animation at, in ticks/msec.
  layer: The sprite's layer.
    Inherited from WorldWidget
  movement_callback: A callback method that should be called whenever the sprite is moved.
NoneType rect: A pygame Rect describing the extent of this widget, in world coordinates.

Class Variable Summary
int A = 4                                                                     
int B = 1                                                                     
int C = 0                                                                     
int D = 3                                                                     

Method Details

__init__(self, category, x=0, y=0, animation=None, on_floor=False)
(Constructor)

Overrides:
pajammin.display.sprite.sprite.Sprite.__init__

move(self, dx, dy)

Overrides:
pajammin.display.sprite.sprite.Sprite.move

move_to(self, x, y)

Overrides:
pajammin.display.sprite.sprite.Sprite.move_to

Property Details

layer

Set Method:
unknown-16911792(...)

x

The x position of this sprite's anchor. (Read-only)

y

The y position of this sprite's anchor. (Read-only)

Class Variable Details

A

Type:
int
Value:
4                                                                     

B

Type:
int
Value:
1                                                                     

C

Type:
int
Value:
0                                                                     

D

Type:
int
Value:
3