Example #1
0
"""General information on your module and what it does."""
import coda_kids as coda

#load sprites constants
IMAGE_BUTTON = coda.Image("button.png")
IMAGE_SNAKE_1 = coda.Image("Snake_1.png")
IMAGE_SNAKE_2 = coda.Image("Snake_2.png")
IMAGE_SNAKE_3 = coda.Image("Snake_3.png")
IMAGE_SNAKE_4 = coda.Image("Snake_4.png")
IMAGE_SNAKE_5 = coda.Image("Snake_5.png")

SOUND_CHARACTER = [[coda.Sound("Select_1.wav"),
                    coda.Sound("Select_2.wav")],
                   [coda.Sound("Select_1.wav"),
                    coda.Sound("Select_2.wav")],
                   [coda.Sound("Select_1.wav"),
                    coda.Sound("Select_2.wav")],
                   [coda.Sound("Select_1.wav"),
                    coda.Sound("Select_2.wav")],
                   [coda.Sound("Select_1.wav"),
                    coda.Sound("Select_2.wav")]]

# text constants
TEXT_1 = "I am snake 1!"
TEXT_2 = "I am snake 2!"
TEXT_3 = "I am snake 3!"
TEXT_4 = "I am snake 4!"
TEXT_5 = "I am snake 5!"


class Data:
Example #2
0
"""General information on your module and what it does."""
import coda_kids as coda

#load sprites
IMAGE_BACKGROUND = coda.Image("assets/background.jpg")
IMAGE_PLAYER1 = coda.Image("assets/player1.png")
IMAGE_PLAYER2 = coda.Image("assets/player2.png")
IMAGE_ASTEROID = coda.Image("assets/asteroid.png")
IMAGE_ASTEROID_2 = coda.Image("assets/asteroid2.png")
SOUND_EXPLOSIONS = [coda.Sound("assets/Explosion1.wav"),
                    coda.Sound("assets/Explosion2.wav")]

SOUND_LASER = [coda.Sound("assets/Laser_Shoot1.wav"),
               coda.Sound("assets/Laser_Shoot2.wav")]

SPRITESHEET_PROJECTILE = [None,
                          coda.SpriteSheet("assets/player1_projectile.png", (36, 24)),
                          coda.SpriteSheet("assets/player2_projectile.png", (48, 48))]
PROJECTILE_ANIMATION = [None,
                        coda.Animator(SPRITESHEET_PROJECTILE[1], 0.4),
                        coda.Animator(SPRITESHEET_PROJECTILE[2], 0.4)]

# constants
SHIP_ROTATE_SPEED = 120
SHIP_MAX_SPEED = 500
SHIP_ACCEL = 10
BULLET_SPEED = 1000
PLAYER_MAX_HP = 10

class Data:
    """place changable state variables here."""
Example #3
0
IMAGE_CHARACTER_1 = coda.Image("assets/Character_1.png")
IMAGE_CHARACTER_2 = coda.Image("assets/Character_2.png")
IMAGE_CHARACTER_3 = coda.Image("assets/Character_3.png")
IMAGE_CHARACTER_4 = coda.Image("assets/Character_4.png")
IMAGE_CHARACTER_5 = coda.Image("assets/Character_5.png")
IMAGE_CHARACTER_6 = coda.Image("assets/Character_6.png")
IMAGE_CHARACTER_7 = coda.Image("assets/Character_7.png")
IMAGE_CHARACTER_8 = coda.Image("assets/Character_8.png")
IMAGE_CHARACTER_9 = coda.Image("assets/Character_9.png")
IMAGE_CHARACTER_10 = coda.Image("assets/Character_10.png")
IMAGE_CHARACTER_11 = coda.Image("assets/Character_11.png")
IMAGE_CHARACTER_12 = coda.Image("assets/Character_12.png")

SOUND_CHARACTER = [
    [
        coda.Sound("assets/Select_1.wav"),
        coda.Sound("assets/Select_2.wav")
    ],
    [
        coda.Sound("assets/Select_1.wav"),
        coda.Sound("assets/Select_2.wav")
    ],
    [
        coda.Sound("assets/Select_1.wav"),
        coda.Sound("assets/Select_2.wav")
    ],
    [
        coda.Sound("assets/Select_1.wav"),
        coda.Sound("assets/Select_2.wav")
    ],
    [