コード例 #1
0
 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) + ")")
コード例 #2
0
ファイル: Game.py プロジェクト: maximx1/PyPlatformerEngine
 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)
コード例 #3
0
 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) + ")")
コード例 #4
0
 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) + ")")