Player
This module is part of the dungeon_gui package, for the graphical representation of the dungeon
- class Player.Player(current_health=100, max_health=100, pos_x=9.4, pos_y=8, character_tileset=<Surface(16x16x32 SW)>, weapon=None, potion=None)
Bases:
objectThis class describes the representation of the Hero Player
- collect_potion(potion)
Calls the function to collect the potion
Parameters
- param potion:
Potion object
- type potion:
Potion
- get_damage(damage)
Manages the damage taken by the hero, updating his health
Parameters
- param damage:
Damage value
- type damage:
int
- get_heal()
Manages the hero’s health, when healing himself
Parameters
- param heal:
Heal value
- type heal:
int
- render_player(screen, scale_factor)
Rendering of the Player Object on the screen using a tile set
Parameters
- param screen:
Screen where dungeon_gui runs
- type screen:
pygame Surface
- param scale_factor:
Object scale factor
- type scale_factor:
int