Ejemplo n.º 1
0
 def step(self, time_passed):  # time passed = frame's time
     super().step(time_passed)
     if not self.paused:
         self.time += time_passed
         if self.current_frame.time <= self.time:
             self.time -= self.current_frame.time
             self.current_frame = self.current_anim.get_frame(self.current_frame.get_next_frame())
             if self.current_frame is None:
                 self.current_frame = self.current_anim.get_frame(0)
                 ccLogger.warning("Animation change should be implemented")
                 # WARNING
             self.active_sprite = self.current_frame.get_sprite()
Ejemplo n.º 2
0
 def add_sprite(cls, sprite_name, sprite):
     if sprite_name in cls.sprites:
         ccLogger.warning(sprite_name +
                          " is already loaded. It will not be overwritten.")
     else:
         cls.sprites[sprite_name] = sprite
Ejemplo n.º 3
0
 def get_objects(self):
     if len(self.objects_list) == 0:
         ccLogger.warning("ccObjectSceneFileLoader's objects_list attribute is empty.")
     return self.objects_list
Ejemplo n.º 4
0
 def add_texture(cls, texture_name, texture):
     if texture_name in cls.textures:
         ccLogger.warning(texture_name + " is already loaded.")
     else:
         cls.textures[texture_name] = texture