def __init__(self, parent_world, color, debug=0): #CubeList.__init__(self, parent_world, min, max, debug) CubeObserver.__init__(self, parent_world, debug) self.distance_from_side = 0 # could be problematic must be sync with the other observers self.debug = debug self.parent_world = parent_world self.world = soya.World() self.parent_world.add(self.world) self.model_builder = soya.SimpleModelBuilder() self.model_builder.shadow = 1 self.material = soya.Material() self.material.environment_mapping = 1 self.material.diffuse = color #(1.0, 1.0, 1.0, 0.3) ### SHINYNESS ^^ ### #self.material.texture = soya.Image.get("env_map.jpeg") ### END SHINYNESS ^^ ### self.size_of_window_x = 15 self.range_x = 5 # For the pos cube. self.size_x = 0.1 bar = soya.cube.Cube(material=self.material) bar.scale(self.size_x, 1, 1) #bar.model_builder = self.model_builder model = bar.to_model() self.pos_cube = soya.Body(self.world, model)
def __init__(self, parent_world, color, color_formula, min_pitch=0., \ max_pitch=11., game=None): CubeObserver.__init__(self, parent_world, min_pitch, max_pitch) self.color = color self.color_formula = color_formula self.game = game
def __init__(self, parent_world, color, min_pitch=0., max_pitch=11.): CubeObserver.__init__(self, parent_world, min_pitch, max_pitch) self.color = color