Exemplo n.º 1
0
def initialize():

    camera.position = Vector3(0.0, 0.0, 5.0)

    board = Board(30, 25)

    cursor = Actor()
    cursor.set_position(3, 3)
    cursor.set_size(1.25)
    world.update_layer(cursor, 5)
    cursor.set_sprite("Resources/Images/cursor.png")

    soldier = Actor()
    soldier.load_sprite_frames("Resources/Images/soldierA")
    soldier.set_size(1.0, 1.0)
    soldier.set_position(3.0, 3.0)
    soldier.play_sprite_animation(1.0, 0, 1)
    world.add(soldier)

    count = Actor()
    count.set_position(3.0, 3.0)
    count.set_sprite("Resources/Images/10.png")
    world.add(count)
Exemplo n.º 2
0
class Tile(object):
    def __init__(self, x, y, sprite):
        self.actor = Actor()
        self.actor.set_position(x, y)
        self.actor.set_sprite(sprite)
        world.add(self.actor)