にしあぷ

札幌在住のエンジニア。コンサドーレ、甘いもの、ドット絵が好き。

Chapter 3. Let's Do Some Actions(アクションさせてみよう)

Cocos2d for Iphone 0.99 Beginner's Guide

Cocos2d for Iphone 0.99 Beginner's Guide

  • Explore different types of basic actions
  • Use composition actions to give the user some nice feedback
  • Learn how to make animations
  • 基本のアクション
  • アクションの組み合わせ
  • アニメーションを作る方法

animating the stone falling (P.94)

ストーンが落ちるアクション。CCMoveTo
GameScene.m > -(void)moveStonesDown

//			[stone.mySprite setPosition:ccp(42*i + GRID_OFFSET.x,42*(GRID_HEIGHT -nilCount +q) + GRID_OFFSET.y)];
			[stone.mySprite setPosition:ccp(42*i + GRID_OFFSET.x,42*(GRID_HEIGHT +q+1) + GRID_OFFSET.y)];
            
            // 追加されるストーンが落ちるアクション
            [stone.mySprite runAction:[CCMoveTo actionWithDuration:0.5 position:ccp(42*i+GRID_OFFSET.x, 42*(GRID_HEIGHT-nilCount+q)+GRID_OFFSET.y)]];

Using Other basic actions (P.95)

  • Position actions:(位置アクション)
    • CCMoveTo
    • CCMoveBy
    • CCJumpTo
    • CCJumpBy
    • CCBezierTo
    • CCBezierBy
    • CCPlace
  • Scale actions:(拡大・縮小アクション)
    • CCScaleTo
    • CCScaleBy
  • Rotation actions:(回転アクション)
    • CCRotateTo
    • CCRotateBy
  • Visible actions:(表示アクション)
    • CCShow
    • CCHide
    • CCToggleVisibility
    • CCBlink
  • Opacity actions:(透明度アクション)
    • CCFadeIn
    • CCFadeOut
    • CCFadeTo
  • Colour actions:(色アクション)
    • CCTintTo
    • CCTintBy

destroying stones with actions (P.98)

ストーンが消えるアクション。CCFadeOut

tinting the time bar (P.99)

タイムバーの色を変える。CCTintTo

making a nice disappear effect (P.101)

ストーンが(カッコよく)消えるアクション。
CCFadeOut, CCScaleTo

making stones fall and grow (P.105)

Ease actions

イージング

animating the grid (P.103)

背景のマス目を縮小拡大する(ボヨンボヨン)
CCRepeat, CCScaleTo

modifying animations with ease actions (P.106)

イージング CCEaseBounceOut

Effect actions (P.108)

  • CCWaves
  • CCWaves3D
  • CCFlipX3D
  • CCFlipY3D
  • CCLens3D
  • CCRipple3D
  • CCShaky3D
  • CCLiquid
  • CCTwirl

making the background shake when matching five stones (P.108)

背景をシェイクする。CCWaves

ready, set, go! (P.111)

ゲームスタート時の演出。

telling the player he lost (P.114)

You lost(ゲームオーバー)を表示させよう

telling the player he lost (P.115)

animating the stones (P.117)

スプライトシートを使ったアニメーション。
CCSpriteFrame, CCSpriteFrameCache

Cocos2d for Iphone 0.99 Beginner's Guide

Cocos2d for Iphone 0.99 Beginner's Guide