view pytouhou/game/player.pxd @ 472:8038f1957b71

Type bullettype, itemtype and lasertype a bit.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 16 Sep 2013 18:42:04 +0200
parents feecdb4a8928
children 887de1309491
line wrap: on
line source

from pytouhou.game.element cimport Element
from pytouhou.game.game cimport Game

cdef class PlayerState:
    cdef public double x, y
    cdef public bint touchable, focused
    cdef public long character, score, effective_score, lives, bombs, power
    cdef public long graze, points

    cdef long invulnerable_time, power_bonus, continues, continues_used, miss,
    cdef long bombs_used


cdef class Player(Element):
    cdef public PlayerState state
    cdef public long death_time
    cdef public Game _game

    cdef object anm
    cdef tuple speeds
    cdef long fire_time, bomb_time, direction

    cdef void set_anim(self, index) except *
    cdef void play_sound(self, str name) except *
    cdef void collide(self) except *
    cdef void fire(self) except *
    cpdef update(self, long keystate)