1
# This code is so you can run the samples without installing the package
4
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
9
from cocos.director import director
10
from cocos.actions import *
11
from cocos.layer import *
13
class BackgroundLayer( cocos.layer.Layer ):
15
super( BackgroundLayer, self ).__init__()
16
self.img = pyglet.resource.image('background_image.png')
21
if __name__ == "__main__":
22
director.init( resizable=True )
23
main_scene = cocos.scene.Scene()
25
main_scene.add( BackgroundLayer(), z=0 )
27
e = SkewHorizontal( duration=1 )
30
director.run( main_scene )