コード例 #1
0
def main():
    print description
    director.init( resizable=True )
    main_scene = Scene()

    red = ColorLayer(255,0,0,128)

    sprite = SpriteLayer()

    red.scale = 0.75

    main_scene.add( red, z=0 )
    main_scene.add( sprite, z=1 )

    sprite.do( Waves3D(duration=2) + Flip(duration=2) )
    director.run (main_scene)
コード例 #2
0
def main():
    print(description)
    director.init(resizable=True)
    main_scene = Scene()

    red = ColorLayer(255, 0, 0, 128)

    sprite = SpriteLayer()

    red.scale = 0.75

    main_scene.add(red, z=0)
    main_scene.add(sprite, z=1)

    sprite.do(Waves3D(duration=2) + Flip(duration=2))
    director.run(main_scene)
コード例 #3
0
        sprite1 = Sprite('grossini.png')
        sprite2 = Sprite('grossinis_sister1.png')
        sprite3 = Sprite('grossinis_sister2.png')

        sprite1.position = (400, 240)
        sprite2.position = (300, 240)
        sprite3.position = (500, 240)

        self.add(sprite1)
        self.add(sprite2)
        self.add(sprite3)


if __name__ == "__main__":
    print 'you shall see an scaled red background and fliping sprites. the background always must be seen (scaled)'
    director.init(resizable=True)
    main_scene = Scene()

    red = ColorLayer(255, 0, 0, 128)

    sprite = SpriteLayer()

    red.scale = 0.75

    main_scene.add(red, z=0)
    main_scene.add(sprite, z=1)

    sprite.do(Waves3D(duration=4) + Flip(duration=4))
    director.run(main_scene)
コード例 #4
0
        super( SpriteLayer, self ).__init__()

        sprite1 = Sprite( 'grossini.png' )
        sprite2 = Sprite( 'grossinis_sister1.png')
        sprite3 = Sprite( 'grossinis_sister2.png')

        sprite1.position = (400,240)
        sprite2.position = (300,240)
        sprite3.position = (500,240)

        self.add( sprite1 )
        self.add( sprite2 )
        self.add( sprite3 )

if __name__ == "__main__":
    print 'you shall see an scaled red background and fliping sprites. the background always must be seen (scaled)'
    director.init( resizable=True )
    main_scene = Scene()

    red = ColorLayer(255,0,0,128)

    sprite = SpriteLayer()

    red.scale = 0.75

    main_scene.add( red, z=0 )
    main_scene.add( sprite, z=1 )

    sprite.do( Waves3D(duration=4) + Flip(duration=4) )
    director.run (main_scene)