Exemple #1
0
    def update(self):
        if scene_main.cookie.die_animation:
            self.speed = 0
        self.x -= self.speed * game_framework.frame_time
        if brave.Brave().x + 300 < self.x:
            self.frame = 0
        elif brave.Brave().x + 300 > self.x:
            self.frame = (self.frame + FRAMES_PER_ACTION * ACTION_PER_TIME *
                          game_framework.frame_time) % 4

        if self.frame >= 3:
            self.frame = 3
        pass
 def __init__(self, row, col):
     # if Fork_sky.image == None:
     Fork_sky.image = load_image('resource\Episode 1 - Escape from the Oven/1. The Witch Oven/epN01_tm01_sdA.png')
     self.y = 500 - 120
     self.x = ((106 * 12) * col + 106 * row - cookie_brave.Brave().x + 118)
     self.speed = 200
     self.type = 3
     pass
Exemple #3
0
 def __init__(self, row, col):
     Fork_sausage.image = load_image(
         'resource\Episode 1 - Escape from the Oven/1. The Witch Oven/epN01_tm01_jp2B.png'
     )
     self.y = 70 + 92
     self.x = ((106 * 12) * col + 106 * row - cookie_brave.Brave().x + 118)
     self.speed = 200
     self.type = 2
     pass
Exemple #4
0
    def __init__(self, row, col):
        self.x = cookie_brave.Brave().x + 600 + col * 30
        self.y = 110 + row * 25
        self.speed = 200
        self.image_x = 0
        self.image_y = 0

        self.type = 0
        pass
Exemple #5
0
 def __init__(self, row, col):
     if Pin_bean.image == None:
         Pin_bean.image = load_image(
             'resource\Episode 1 - Escape from the Oven/1. The Witch Oven/epN01_tm01_jp1B.png'
         )
     self.y = 70 + 45  # 115
     self.x = ((106 * 12) * col + 106 * row - cookie_brave.Brave().x + 118)
     self.speed = 200
     self.type = 1
     pass
    def __init__(self, row, col):
        self.x = ((106 * 12) * col + 106 * row - cookie_brave.Brave().x + 118)
        self.y = 70
        self.speed = 200
        self.image = None

        self.frame = 0
        self.time = 0

        self.timer = 0
        self.type = 0
 def __init__(self, row, col):
     # if Stone_1.image == None:
     self.frame = 0
     self.time = 0
     self.speed = 400
     Stone_1.image = load_image(
         'resource\Episode 1 - Escape from the Oven/1. The Witch Oven/epN01_tm01_bl1_ing_sprite.png'
     )
     self.x = (
         (106 * 12) * col + 106 * row - cookie_brave.Brave().x + 118) * 2
     self.y = 500 / 2 - 140
     self.type = 4
     pass
Exemple #8
0
    def __init__(self, row, col):
        if Trident.image == None:
            Trident.image = load_image(
                'resource\Episode 1 - Escape from the Oven/1. The Witch Oven/epN01_tm01_1.png'
            )

        self.frame = 0
        self.time = 0
        self.speed = 200
        self.x = ((106 * 12) * col + 106 * row - brave.Brave().x + 118)
        self.y = 500 / 2 - 110
        self.type = 6
        pass
Exemple #9
0
def enter():
    global backgrounds, paths, obstacles, line, cookie, select_cookie, timer, jelly_line, jelly_file
    global button, score_font, score_font_back, coin_image, jelly_image, obs_sound

    backgrounds = background.Background()
    game_world.add_object(backgrounds, 0)

    if scene_lobby.select_cookie == 1:
        cookie = cookie_brave.Brave()
        cookie.newPosition(200, 70 + 115)
    elif scene_lobby.select_cookie == 2:
        cookie = cookie_bright.Bright()
        cookie.newPosition(200, 70 + 115)
    game_world.add_object(cookie, 2)

    obstacle_init()

    jelly_init()

    for item in jellies:
        game_world.add_object(item, 1)
        item.initialize()

    paths = [path.Path(n) for n in range(2)]
    for i in paths:
        game_world.add_object(i, 0)

    game_world.add_object(scene_lobby.life_num, 2)

    timer = 0

    scene_lobby.bgm = load_music('sound/Cookie Run Ovenbreak - Theme Song Breakout 1.mp3')
    scene_lobby.bgm.get_volume()
    scene_lobby.bgm.repeat_play()

    button = ui.UI()
    game_world.add_object(button, 2)

    if score_font == None:
        score_font = load_font('font/Maplestory Light.ttf', 20)

    if coin_image == None:
        coin_image = load_image('resource/Cookie Skill Effects and Jellies/jelly/silver coin.png')
    if jelly_image == None:
        jelly_image = load_image('resource/Cookie Skill Effects and Jellies/jelly/simple jelly.png')

    if obs_sound == None:
        obs_sound = load_wav('sound/effect sound/g_obs1.wav')
    obs_sound.set_volume(60)

    cookie.score = 0
def enter():
    global top_image, bottom_image, mouse, brave, bright, select_image, play_image, no_play_image, bgm, pick, coin, play
    global click_x, click_y
    play = False
    global font, list, coin_image, life_num, life_image, store
    if top_image == None:
        top_image = load_image('resource/background/robby_top1.png')

    if bottom_image == None:
        bottom_image = load_image('resource/background/robby_bottom.png')

    if mouse == None:
        hide_cursor()
        mouse = load_image('resource/UI/mouse1.png')

    if select_image == None:
        select_image = load_image('resource/UI/epN01_tm11_jp2down.png')

    if play_image == None:
        play_image = load_image('resource/UI/play.png')

    if no_play_image == None:
        no_play_image = load_image('resource/UI/no play.png')

    if store == None:
        store = load_image('resource/UI/store.png')

    brave = cookie_brave.Brave()
    brave.newPosition(500 - 150, 250)

    bright = cookie_bright.Bright()
    bright.newPosition(500 + 150, 250)

    life_num = life.LIFE()
    if life_image == None:
        life_image = load_image('resource/UI/life.png')

    bgm = load_music(
        'sound/Cookierun- Ovenbreak - OST - Trial Mode Main Lobby Theme - Extended 10 minutes.mp3'
    )
    bgm.get_volume()
    bgm.repeat_play()

    if pick == None:
        pick = load_wav('sound/picking.wav')
        pick.set_volume(60)

    if font == None:
        font = load_font('font/Maplestory Bold.ttf', 30)

    if coin_image == None:
        coin_image = load_image(
            'resource/Cookie Skill Effects and Jellies/jelly/silver coin.png')

    f = open('coin data.txt', 'r')
    coin = f.read()
    f.close()

    click_y = 0
    click_x = 0
    pass