コード例 #1
0
ファイル: job_mode.py プロジェクト: PhilH725/Zero_to_Hero
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    game.bgImage = pygame.image.load('images/bg/default.bmp')
    job = game_data.bear_hunt
    jobFunction(game, job)
コード例 #2
0
def characterCreationScreen():

    player = class_player.Player('')

    basicInfoSlide(player)
    chooseClassSlide(player)

    return player
コード例 #3
0
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    game.bgImage = pygame.image.load('images/bg/default.bmp')
    game.activeJobs = [game_data.bear_hunt]
    game.activeJobs[0].startDay = 3
    game.player.classStats = {'Sword': 40, 'Shield': 30, 'Heavy Armor': 35}
    game.player.stats = {
        'Health': 60,
        'Strength': 60,
        'Endurance': 50,
        'Intelligence': 30,
        'Perception': 45,
        'Focus': 40,
        'Charisma': 50,
        'Stealth': 30,
        'Speed': 40
    }
    game.player.weapon = 'Iron Sword'
    game.player.armor = 'Chain Mail'
    game.player.accessory = 'Bronze Ring'
    statusScreenMenu(game)
コード例 #4
0
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    destination = game_data.riverwood  #uses astralis as a starting point and riverwood as a sample destination
    travelFunction(game, destination)
コード例 #5
0
ファイル: sprites.py プロジェクト: alexxandre80/Projet_Python
    new_scale = (rect.width * playerScale, rect.height * playerScale)

    image = pygame.transform.scale(image, new_scale)
    player1Right.append(image)

player1Left = []
for counter in range(1, 5):
    imagePath = 'Sprites/Player1/Player1_Left.png'
    image = pygame.image.load(imagePath)
    rect = image.get_rect()
    new_scale = (rect.width * playerScale, rect.height * playerScale)

    image = pygame.transform.scale(image, new_scale)
    player1Left.append(image)

player_1 = player.Player(player1Right, player1Left, 0, 0, screen_size, 100,
                         "Joueur 1")

player2Right = []
for counter in range(1, 5):
    imagePath = 'Sprites/Player2/Player2_Right.png'
    image = pygame.image.load(imagePath)
    rect = image.get_rect()
    new_scale = (rect.width * playerScale, rect.height * playerScale)

    image = pygame.transform.scale(image, new_scale)
    player2Right.append(image)

player2Left = []
for counter in range(1, 5):
    imagePath = 'Sprites/Player2/Player2_Left.png'
    image = pygame.image.load(imagePath)
コード例 #6
0
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    worldMap(game)
コード例 #7
0
def mainMenuScreen():

    while True:
        select = None

        common_functions.standardEventHandling()

        cfg.DISPLAYSURF.fill(cfg.BLACK)

        mainMenuBackSurf = pygame.Surface((250, 280))
        mainMenuBackRect = mainMenuBackSurf.get_rect()
        mainMenuBackRect.midtop = (cfg.WINWIDTH / 2, cfg.WINHEIGHT / 8)
        cfg.DISPLAYSURF.blit(mainMenuBackSurf, mainMenuBackRect)
        pygame.draw.rect(cfg.DISPLAYSURF, cfg.BLUE, mainMenuBackRect, 2)

        x = mainMenuBackRect.centerx
        y = mainMenuBackRect.top + 20
        for i in cfg.MAINMENUOPTIONS:
            optionSurf = cfg.AR28.render(i, True, cfg.WHITE)
            optionRect = optionSurf.get_rect()
            optionRect.midtop = (x, y)
            if optionRect.collidepoint(cfg.mouseX, cfg.mouseY):
                optionSurf = cfg.AR28.render(i, True, cfg.RED)
                pygame.draw.line(cfg.DISPLAYSURF, cfg.WHITE,
                                 (optionRect.left + 5, optionRect.bottom + 1),
                                 (optionRect.right - 5, optionRect.bottom + 1),
                                 1)
                if cfg.mouseClicked:
                    select = i
            cfg.DISPLAYSURF.blit(optionSurf, optionRect)
            y += 50

        if select == 'Quick Play':
            player = class_player.Player('Phil')
            player.playerClass = 'Warrior'
            player.classStats = {'Sword': 40, 'Shield': 30, 'Heavy Armor': 35}
            player.stats = {
                'Health': 60,
                'Strength': 60,
                'Endurance': 50,
                'Intelligence': 30,
                'Perception': 45,
                'Focus': 40,
                'Charisma': 50,
                'Stealth': 30,
                'Speed': 40
            }
            game = class_game.Game(player)
            return game

        elif select == 'Create Character':
            player = character_creation.characterCreationScreen()
            game = class_game.Game(player)
            return game

        elif select == 'Load Game':
            #long way off from this :P
            pass

        elif select == 'Options':
            pass

        elif select == 'Exit Game':
            common_functions.terminate()

        pygame.display.update()
        cfg.FPSCLOCK.tick(cfg.FPS)
コード例 #8
0
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    hub = game_data.astralis  #uses Phil and Riverwood as default placeholders
    adventureMode(game, hub)
コード例 #9
0
    image = pygame.transform.scale(image, new_scale)
    player1Right.append(image)

player1Left = []
for counter in range(1, 5):
    imagePath = 'Sprites/Captain America Sprites/CaptainAmerica_Left_' + str(
        counter) + '.png'
    image = pygame.image.load(imagePath)
    rect = image.get_rect()
    new_scale = (rect.width * playerScale, rect.height * playerScale)

    image = pygame.transform.scale(image, new_scale)
    player1Left.append(image)

player_1 = player.Player(player1Right, player1Left, 0, 0, screen_size, 100,
                         "Captain America")

player2Right = []
for counter in range(1, 5):
    imagePath = 'Sprites/Iron Man Sprites/IronMan_Right_' + str(
        counter) + '.png'
    image = pygame.image.load(imagePath)
    rect = image.get_rect()
    new_scale = (rect.width * playerScale, rect.height * playerScale)

    image = pygame.transform.scale(image, new_scale)
    player2Right.append(image)

player2Left = []
for counter in range(1, 5):
    imagePath = 'Sprites/Iron Man Sprites/IronMan_Left_' + str(
コード例 #10
0
def main():

    player = class_player.Player('Phil')
    game = class_game.Game(player)
    location = game_data.astralis_library #uses Phil and Riverwood as default placeholders
    locationScreen(game, location)