Exemplo n.º 1
0
 def receive_update(self, event):
     """
     Receive update from entity
     """
     if e_event_type(event) == 'hit points changed':
         self.show_hit_points(e_character(event))
     elif e_event_type(event) == 'spirit points changed':
         self.show_spirit_points(e_character(event))
Exemplo n.º 2
0
 def receive_update(self, event):
     """
     Receive update from entity
     """
     if e_event_type(event) == 'hit points changed':
         self.show_hit_points(e_character(event))
     elif e_event_type(event) == 'spirit points changed':
         self.show_spirit_points(e_character(event))
Exemplo n.º 3
0
    def __init__(self, event):
        """
        Default constructor
        """
        super().__init__(event)

        self.start = e_old_location(event)
        self.destination = e_character(event).location
        self.direction = e_direction(event)
        self.mover = e_character(event)

        self.flipped = False
        self.offset = 0
Exemplo n.º 4
0
    def __init__(self, event):
        """
        Default constructor
        """
        super().__init__(event)

        self.start = e_old_location(event)
        self.destination = e_character(event).location
        self.direction = e_direction(event)
        self.mover = e_character(event)

        self.flipped = False
        self.offset = 0
Exemplo n.º 5
0
    def __init__(self, event):
        """
        Default constructor
        """
        super().__init__(event)

        self.location = e_character(event).location
        self.text = '!'
        self.colour = 'red'
        self.offset = (0, 16)
Exemplo n.º 6
0
    def __init__(self, event):
        """
        Default constructor
        """
        super().__init__(event)

        self.location = e_character(event).location
        self.text = '?'
        self.colour = 'yellow'
        self.offset = (0, 16)
Exemplo n.º 7
0
 def receive_event(self, event):
     """
     Receive event to display
     """
     if e_event_type(event) in self.event_types_to_show:
         if e_event_type(event) == 'new level':
             if e_character(event) is self.character:
                 self.text_edit.append("You have reached new level: {0} - {1}".format(
                     level_name(e_level(event)),
                     level_description(e_level(event))))
         else:
             pass
Exemplo n.º 8
0
 def receive_event(self, event):
     """
     Receive event to display
     """
     if e_event_type(event) in self.event_types_to_show:
         if e_event_type(event) == 'new level':
             if e_character(event) is self.character:
                 self.text_edit.append(
                     "You have reached new level: {0} - {1}".format(
                         level_name(e_level(event)),
                         level_description(e_level(event))))
         else:
             pass