예제 #1
0
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        GlobalEvents.bind(mine_batch_finished=self.batch_finished)
        GlobalEvents.bind(remove_mine_finished_icon=self.remove_finished_icon)
        GlobalEvents.bind(on_scatter_transformed=self.update_positions)
예제 #2
0
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        self.size_hint = None, None

        self.register_event_type("on_items")
    def __init__(self, path: str):
        BetterLogger.__init__(self)

        self.path = path

        self.log_debug("Loading file", path)
        self.array = json.load(open(path))
예제 #4
0
 def __init__(self, *args, **kwargs):
     BetterLogger.__init__(self, *args, **kwargs)
     self.audio.__log_name_prefix__ = "Audio_"
     self.font.__log_name_prefix__ = "Font_"
     self.language.__log_name_prefix__ = "Language_"
     self.texture.__log_name_prefix__ = "Textures_"
     self.model.__log_name_prefix__ = "Models_"
     self.gameConfig.__log_name_prefix__ = "GameConfig_"
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        ScreenManager.__init__(self, **kwargs)

        self.log_info("Using NoTransition")
        self.transition: TransitionBase = NoTransition()

        self.set_screen("LoadingScreen")
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        ButtonBehavior.__init__(self)
        BoxLayout.__init__(self, **kwargs)

        self.label = MultiLangLabel(font_name="Buttons-merge_options_text", color=self.label_color,
                                    font_size=graphicsConfig.getint("Buttons", "flat_font_size"), size_hint=(1, 1))

        self.add_widget(self.label)
예제 #7
0
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        ScreenManager.__init__(self, **kwargs)

        self.log_info("Using NoTransition")
        self.transition: TransitionBase = NoTransition()
        self.transition.duration = 0

        Audio.loop("main_theme")
    def __init__(self, *args, **kwargs):
        BetterLogger.__init__(self)
        self.log_deep_debug("Creating building with args", args, kwargs)
        self.on_building___type__(self, self.__type__)

        EventDispatcher.__init__(self, *args, **kwargs)

        SaveManager.register_update_game_data_function(self.update_game_data)


        if self.__type__ == "None":
            self.log_warning("BuildingBase needs to have a __type__, this should've be set when overridden")
예제 #9
0
    def __init__(self, loader, name=''):
        self.name = name
        self.faces = []
        self.loader = loader
        self.mtl_name = None

        BetterLogger.__init__(self)

        from resources import Textures  # Circular import fix
        self.textures = Textures

        kv3WaveObject.__init__(self, loader, name='')
    def __init__(self, **kwargs):
        self.bg_image = Image(allow_stretch=True, keep_ratio=True)
        self.fg_image = Image(allow_stretch=True, keep_ratio=True)

        BetterLogger.__init__(self)
        ButtonBehavior.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        self.add_widget(self.bg_image)
        self.add_widget(self.fg_image)

        self.bg_image.texture = Textures.get("Buttons", "bg_" + str(self.bg_type))
        self.size_hint_x = None
        self.size_hint_y = graphicsConfig.getfloat("Buttons", "size_hint_y_" + str(self.size_type))
예제 #11
0
    def __init__(self, **kwargs):
        self.bg_image = Image(allow_stretch=True, keep_ratio=True)
        self.fg_image = Image(allow_stretch=True, keep_ratio=True)

        BetterLogger.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        self.bg_image.texture = Textures.get("ResourceMiner", "finished_icon_bg")

        self.size_hint_x = None
        self.size_hint_y = 0.1

        self.add_widget(self.bg_image)
        self.add_widget(self.fg_image)
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        self.create_renderer()
        if userSettings.get("debug", "building_hit_boxes"):
            self.bind(buildings=lambda _instance, _value: self.redraw_hit_boxes())
            GlobalEvents.bind(building_moved=lambda _instance, _x, _y: self.redraw_hit_boxes(),
                              building_rotated=lambda _instance, _rotation: self.redraw_hit_boxes())

        self.log_info("Created renderer, starting to create building objects")

        for building_id in gameData.get("placed_buildings"):
            building_info = gameData.get("placed_buildings", building_id)
            building_class = str_to_building[building_info.pop("type")]
            building = building_class(**building_info)
            building.id = building_id

            self.log_debug("Created building object for building", building_id, "with info", building_info)
            self.add_building(building)

        self.log_info("Created objects -", self.buildings)
 def __init__(self, **kwargs: any):
     BetterLogger.__init__(self)
     Image.__init__(self, **kwargs)
     self.on_text_id(self, self.text_id)
 def __init__(self, *args, **kwargs):
     BetterLogger.__init__(self)
     ConfigParser.__init__(self, *args, **kwargs)
 def __init__(self, **kwargs):
     BetterLogger.__init__(self)
     Screen.__init__(self, **kwargs)
 def __init__(self, **kwargs):
     ScatterLayout.__init__(self, **kwargs)
     BetterLogger.__init__(self)
예제 #17
0
 def __init__(self, **kwargs):
     BetterLogger.__init__(self)
     kv3OBJLoader.__init__(self, **kwargs)
예제 #18
0
 def __init__(self):
     EventDispatcher.__init__(self)
     BetterLogger.__init__(self, name="SaveManager")
예제 #19
0
 def __init__(self):
     BetterLogger.__init__(self)
예제 #20
0
 def __init__(self):
     BetterLogger.__init__(self)
     EventDispatcher.__init__(self)
     self.language_code = userSettings.get("UI", "language")
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        FloatLayout.__init__(self, **kwargs)

        self.add_widget(self.move_buttons_holder)
        self.add_widget(self.custom_buttons_holder)