def on_start(self): "Get and play the sound object" gamedata = get_gamedata() setattr(gamedata, self.value_name, self.value)
def on_exit(self): "Stop the sound" gamedata = get_gamedata() gamedata.unregister_callback(self.value_name, self.on_value_change)
def on_start(self): "Get and play the sound object" gamedata = get_gamedata() if self.relative_to_start: self.test_value += getattr(gamedata, self.value_name) gamedata.register_callback(self.value_name, self.on_value_change)