<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                1.第一步:使用Zwoptex 制作精靈表單 ![](https://box.kancloud.cn/2016-08-22_57bab558a747a.jpg) 2.制作的表單的名稱為 cocos2Dpng,cocos2D.plist; 3.精靈的動畫效果 主要分為五部分。 ~~~ // on "init" you need to initialize your instance -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super's" return value if( (self=[super init]) ) { // ask director for the window size // //1將精靈幀紋理添加到精靈幀緩存中 [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"cocos2D.plist"]; //2創建一個精靈表單 CCSpriteBatchNode *batchNode = [CCSpriteBatchNode batchNodeWithFile:@"cocos2D.png"]; [self addChild:batchNode]; //穿件圖片幀列表 NSMutableArray *animFrames = [NSMutableArray array]; for (int i = 1; i < 4; i ++) { CCSpriteFrame *temp = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:[NSString stringWithFormat:@"pandawalk%d.png",i]]; [animFrames addObject:temp]; } //4創建一個 動畫對象 CCAnimation *walkAnim = [CCAnimation animationWithSpriteFrames:animFrames delay:0.1f]; //5創建精靈,運行動畫動作 CGSize size = [[CCDirector sharedDirector] winSize]; CCSprite *panda = [CCSprite spriteWithSpriteFrameName:@"pandawalk1.png"]; panda.position = ccp(size.width*0.8, size.height*0.4); id walkAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:walkAnim]]; [panda runAction:walkAction]; [panda runAction:[CCMoveTo actionWithDuration:6.0f position:ccp(size.width*0.2, size.height*0.4)]]; [batchNode addChild:panda]; } return self; } ~~~ 效果圖: ![](https://box.kancloud.cn/2016-08-22_57bab558c814c.jpg) ![](https://box.kancloud.cn/2016-08-22_57bab558e0e89.jpg)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看