def __init__(self, *args, **kwargs): ViewTowers.__init__(self, *args, **kwargs) # ignore keys set by viewer for key in self.getAllAccepting(): if key in ("s", "escape"): continue self.ignore(key) self.permanent_events = self.getAllAccepting() # global variables self.text_bg = (1, 1, 1, 0.7) self.font = self.loader.loadFont('cmr12.egg') self.question = [ "Will this tower fall?", [[1, "definitely will not fall"], [2, "probably will not fall"], [3, "might not fall"], [4, "don't know"], [5, "might fall"], [6, "probably will fall"], [7, "definitely will fall"]]] self.question_keys = ["1", "2", "3", "4", "5", "6", "7"] self.choice_text_start = 0.65 self.feedback_time = 3.0 self.buffer_time = 0.75 # create text self.create_all_text()
def __init__(self, *args, **kwargs): ViewTowers.__init__(self, *args, **kwargs) # ignore keys set by viewer for key in self.getAllAccepting(): if key in ("s", "escape"): continue self.ignore(key) self.permanent_events = self.getAllAccepting() # global variables self.text_bg = (1, 1, 1, 0.7) self.font = self.loader.loadFont("cmr12.egg") self.question = "Use the mouse to indicate the direction that " "the tower will fall." self.feedback_time = 3.0 self.buffer_time = 0.75 # create text self.create_all_text() # create direction line self.line = LineSegs() self.line_node = None self.angle = None alight = AmbientLight("alight3") alight.setColor((0.8, 0.8, 0.8, 1)) self.line_light = self.lights.attachNewNode(alight)
def __init__(self, *args, **kwargs): ViewTowers.__init__(self, *args, **kwargs) # ignore keys set by viewer for key in self.getAllAccepting(): if key in ("s", "escape"): continue self.ignore(key) self.permanent_events = self.getAllAccepting() # global variables self.text_bg = (1, 1, 1, 0.7) self.font = self.loader.loadFont('cmr12.egg') self.question = ( "Use the mouse to indicate the direction that " "the tower will fall.") self.feedback_time = 3.0 self.buffer_time = 0.75 # create text self.create_all_text() # create direction line self.line = LineSegs() self.line_node = None self.angle = None alight = AmbientLight('alight3') alight.setColor((0.8, 0.8, 0.8, 1)) self.line_light = self.lights.attachNewNode(alight)
def __init__(self, *args, **kwargs): ViewTowers.__init__(self, *args, **kwargs) # ignore keys set by viewer for key in self.getAllAccepting(): if key in ("s", "escape"): continue self.ignore(key) self.permanent_events = self.getAllAccepting() # global variables self.text_bg = (1, 1, 1, 0.7) self.font = self.loader.loadFont('cmr12.egg') self.question = [ "Will this tower fall?", [[1, "definitely will not fall"], [2, "probably will not fall"], [3, "might not fall"], [4, "don't know"], [5, "might fall"], [6, "probably will fall"], [7, "definitely will fall"]] ] self.question_keys = ["1", "2", "3", "4", "5", "6", "7"] self.choice_text_start = 0.65 self.feedback_time = 3.0 self.buffer_time = 0.75 # create text self.create_all_text()