Example #1
0
    def __init__(self):
        super( TestLayer, self ).__init__()

        x,y = director.get_window_size()
        self.skin = skeleton.ColorSkin(sample_skeleton.skeleton,
                                        (255,0,0,255))
        self.add( self.skin )
        x, y = director.get_window_size()
        self.skin.position = x/2, y/2
Example #2
0
    def __init__(self):
        super(TestLayer, self).__init__()

        x, y = director.get_window_size()

        # create a ColorSkin for our skeleton
        self.skin = skeleton.ColorSkin(root_bone.skeleton, (255, 0, 0, 255))

        # add the skin to the scene
        self.add(self.skin)
        x, y = director.get_window_size()
        self.skin.position = x / 2, y / 2
Example #3
0
    def __init__(self):
        super(TestLayer, self ).__init__()

        x,y = director.get_window_size()
        
        skel = Figure(-100)

        # create a ColorSkin for our skeleton
        self.skin = skeleton.ColorSkin(skel, (255,255,255,255))
        
        # add the skin to the scene
        self.add( self.skin )
        x, y = director.get_window_size()
        self.skin.position = x/2, y/2

        anim = pickle.load(open('dance.anim', 'rb'))
        self.skin.do(cocos.actions.Repeat(skeleton.Animate(anim)))