def update(self, actor, entity): image = actor.spriteStages["standing"] imageUtils = ImageUtils(image) entity.image = imageUtils.scale(actor.stateDict["animationProperties"]["width"], actor.stateDict["animationProperties"]["height"]).getImage() self.updateRect(entity) loggerUtil = LoggerUtil() loggerUtil.info("CharacterLocation: (" + str(entity.rect.x) + ", " + str(entity.rect.y) + ")")
def __init__(self, settingsFile): settings = Settings(settingsFile).settings settings["enableLogging"] = True if settings["enableLogging"] == "True" else False self.screenWidth = int(settings["screenWidth"]) self.screenHeight = int(settings["screenHeight"]) self.screen = pygame.display.set_mode((self.screenWidth, self.screenHeight)) self.clock = pygame.time.Clock() loggerUtil = LoggerUtil() loggerUtil.setLogger(settings)
def draw(self, entity): entity.image = entity.spriteStages["standing"] #image = entity.spriteStages["standing"] #imageUtils = ImageUtils(image) #entity.image = imageUtils.scale(self.props["width"], self.props["height"]).getImage() originalX = entity.rect.x originalY = entity.rect.y entity.rect = entity.image.get_rect() entity.rect.x = originalX entity.rect.y = originalY loggerUtil = LoggerUtil() loggerUtil.info("CharacterLocation: (" + str(entity.rect.x) + ", " + str(entity.rect.y) + ")")
def update(self, actor, entity): entity.image = actor.spriteStages["standing"] self.updateRect(entity) loggerUtil = LoggerUtil() loggerUtil.info("CharacterLocation: (" + str(entity.rect.x) + ", " + str(entity.rect.y) + ")")