Exemplo n.º 1
0
 def __handle_rfid(self, rfid):
     self.current_rfid = rfid
     SoundManager.play(Trigger.RFID)
     # RFID --> player ID
     player_id = PlayerData.get_player_by_rfid(rfid)
     # player ID --> player dict
     player = PlayerData.get_player_by_id(player_id)
     if player:
         time.sleep(0.5)
         self.current_player = player
     else:
         self.current_player = {}
Exemplo n.º 2
0
 def __handle_rfid(self, rfid):
     # RFID --> player ID
     player_id = PlayerData.get_player_by_rfid(rfid)
     # player ID --> player dict
     player = PlayerData.get_player_by_id(player_id)
     Logger.info('ScoreTracker: RFID: {0} - ID: {1} - Player: {2}'.format(rfid, player_id, player))
     # player does not exist
     if player == None:
         self.denied()
     # player does exist
     else:
         if self.dropdown_player:
             self.dropdown_player.dismiss()
         self.set_player(player)