Ejemplo n.º 1
0
 def __init__(self, game, node):
     BaseNodeScript.__init__(self, game, 'SoundsExample', node)
     self.log = logging.getLogger('SoundsExample')
     
     # reference to sounds fx player
     self.sounds = None
     
     # the following set of fields are UI labels
     self.instructions = None
     self.soundsStatusText = None
     self.volumeText = None
     self.rateText = None
     self.balanceText = None
     self.loopText = None
     self.eventText = None
     
     # reference to the 'blah' sound 
     self.blahSound = None
     
     # holds the status of sounds, if True then sounds are globally enabled
     self.lastStatus = True
     
     # flags that indicate if the respective property has been update by the user
     self.updateVolume = False
     self.updateRate = False
     self.updateBalance = False
     self.updateLooping = False
     
     # 
     self.looping = 0
Ejemplo n.º 2
0
    def __init__(self, game, node):
        BaseNodeScript.__init__(self, game, 'Example_i18n', node)
        self.log = logging.getLogger('Example_i18n')

        self.currentLanguage = "en"

        self.languageToStr = {
            'en': 'English',
            'gr': 'Greek',
            'ar': 'Arabic',
            'cn': 'Traditional Chinese'
        }
        self.languages = ['en', 'gr', 'ar', 'cn']

        self.languageLabel = None
Ejemplo n.º 3
0
    def __init__(self, game, node):

        # we must call the parent class
        BaseNodeScript.__init__(self, game, 'sudoku', node)

        self.log = logging.getLogger('sudoku')

        # stores the current state of the board
        self.board = []

        # stores the initial state of the board, as defined in start_pos.txt
        self.initBoard = []

        # stores the solved state of the board, as defined in solution_pos.txt
        self.solutionBoard = []
Ejemplo n.º 4
0
    def __init__(self, game, node):                
        BaseNodeScript.__init__(self, game, 'MusicExample', node)        
        self.log = logging.getLogger('MusicExample')

        # displays the current track
        self.instructions = None
        
        # used to detect a change in the active track
        self.lastActiveTrack = None
        
        # two different music playlists
        self.list1 = None
        self.list2 = None
        
        # displays active track
        self.trackLabel = None

        # displays active playlist
        self.playlistLabel = None
Ejemplo n.º 5
0
 def __init__(self, game, node):
     BaseNodeScript.__init__(self, game, 'MultifilesExample', node)
     self.log = logging.getLogger('MultifilesExample')