Esempio n. 1
0
def incr_health(state, points):
        hp = get_health(state)
        hp += points
        user.set_data(state, USERDATA_HEALTH, hp)
        text.set_text_sprite(state, ENT_TEXT_HEALTH, get_health_text(state), FONT_NAME, True)
Esempio n. 2
0
def incr_score(state, points):
        score = user.get_data(state, USERDATA_SCORE)
        score += points
        user.set_data(state, USERDATA_SCORE, score)
        text.set_text_sprite(state, ENT_TEXT_SCORE, get_score_text(state), FONT_NAME, True)