SlideShare une entreprise Scribd logo
2011/6/25   1
2011/6/25   2
2011/6/25   3
2011/6/25   4
2011/6/25   5
2011/6/25   6
2011/6/25   7
2011/6/25   8
2011/6/25   9
2011/6/25   10
2011/6/25   11
2011/6/25   12
2011/6/25   13
2011/6/25   14
2011/6/25   15
2011/6/25   16
2011/6/25   17
2011/6/25   18
2011/6/25   19
2011/6/25   20
2011/6/25   21
2011/6/25   22
2011/6/25   23
/        .::::::::::::::::::::::::;;:;;::,                        ::::
                      l        ,       rj,r    '"'"'"                   l :::::::
                           Y                                                      ,! :::::::
                           |                                                                ::::::::
                           | __                 --                                i::::,r
              `'' -                '               ´           ,                   }::;! , .
                                                 """"´                                             L_
                                   /                                                i          ,        /|                     r
            ≡ -           ´        ,,.._                                      i             't-'        | ,               ,r
            , yx=''"                   {       ,-                         ;             l                '    r       '
                                               `--                                      /!                        `
                   _,, -                             ''                                 ;                                 `
            -''"_,, -''"                                               ;;'         ,'          /
            -''"                               `          ''       ;;;;' ,'
2011/6/25                                                                                                                          24
                                           /                             _ =
#import “YourScene.h”

            [[CCDirector sharedDirector] replaceScene: [YourScene scene]];

2011/6/25                                                                    25
#import “YourScene.h”
              id transition = [CCTransitionFade transitionWithDuration:0.5f
            scene:[YourScene scene];
              [[CCDirector sharedDirector] replaceScene:transition];



2011/6/25                                                                     26
-(void) registerWithTouchDispatcher{
              [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self
            priority:0 swallowsTouches:YES];
            }




2011/6/25                                                                      27
- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
              //
                return YES;
            }
2011/6/25                                                                       28
-(id) init{
              if( (self=[super init])) {
                 // create and initialize a Label
                 CCLabelTTF *label = [CCLabelTTF labelWithString:@"Hello World" fontName:@"Marker
            Felt" fontSize:64];

                  // ask director the the window size
                  CGSize size = [[CCDirector sharedDirector] winSize];

                  // position the label on the center of the screen
                  label.position = ccp( size.width /2 , size.height/2 );

                  // add the label as a child to this Layer
                  [self addChild: label];

                  self.isTouchEnabled = YES;
                }
                return self;
            }

            -(void) registerWithTouchDispatcher{
              [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0
            swallowsTouches:YES];
            }

            - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
              id transition = [CCTransitionFade transitionWithDuration:0.5f scene:[YourScene scene];
              [[CCDirector sharedDirector] replaceScene:transition];
              return YES;
            }
2011/6/25                                                                                              29
CCSprite sprite = [CCSprite spriteWithFile:@”sprite.png”];
            //
                 sprite.position = ccp(100, 100); //
                 [self addChild:sprite]; //        Sprite




2011/6/25                                                                     30
// 240, 160   3           Action
            id move = [CCMoveTo actionWithDuration:3 position:ccp(240, 160)];
            // 2       360        Action
            id rotate = [CCRotateBy actionWithDuration:2 angle:360];
            // 4             127              Action
            id fade = [CCFadeTo actionWithDuration:4 opacity:127];
            //        Action   Sequence
            CCSequence* sequence = [CCSequence actions:move, rotate, fade, nil];
            // Sequence Sprite
            [sprite runAction:sequence];


2011/6/25                                                                          31
2011/6/25   32
2011/6/25   33
2011/6/25   34
2011/6/25   35
2011/6/25   36
2011/6/25   37
2011/6/25   38
2011/6/25   39
2011/6/25   40
2011/6/25   41

Contenu connexe

Similaire à cocos2d入門 (6)

TDD Boot Camp 札幌 2.0
TDD Boot Camp 札幌 2.0TDD Boot Camp 札幌 2.0
TDD Boot Camp 札幌 2.0
 
¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?
 
cocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装からcocos2d 事例編 HungryMasterの実装から
cocos2d 事例編 HungryMasterの実装から
 
रियो डी जनेरियो
रियो डी जनेरियोरियो डी जनेरियो
रियो डी जनेरियो
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
 
Open Cv Tutorial Ii
Open Cv Tutorial IiOpen Cv Tutorial Ii
Open Cv Tutorial Ii
 

Plus de Kohki Miki

Decksetがよかった話
Decksetがよかった話Decksetがよかった話
Decksetがよかった話
Kohki Miki
 
VOXCHRONICLE企画草案
VOXCHRONICLE企画草案VOXCHRONICLE企画草案
VOXCHRONICLE企画草案
Kohki Miki
 
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
Kohki Miki
 
【TDDBC2.1】やる夫で学ぶTDD
【TDDBC2.1】やる夫で学ぶTDD【TDDBC2.1】やる夫で学ぶTDD
【TDDBC2.1】やる夫で学ぶTDD
Kohki Miki
 
はてなインターンシップ2011、ワークショップ発表プレゼン
はてなインターンシップ2011、ワークショップ発表プレゼンはてなインターンシップ2011、ワークショップ発表プレゼン
はてなインターンシップ2011、ワークショップ発表プレゼン
Kohki Miki
 

Plus de Kohki Miki (20)

watchOS 2でゲーム作ってみた話
watchOS 2でゲーム作ってみた話watchOS 2でゲーム作ってみた話
watchOS 2でゲーム作ってみた話
 
cocos2d-consoleでパッケージ管理
cocos2d-consoleでパッケージ管理cocos2d-consoleでパッケージ管理
cocos2d-consoleでパッケージ管理
 
エターナらないゲーム開発
エターナらないゲーム開発エターナらないゲーム開発
エターナらないゲーム開発
 
ゲームコミュニティサミット2014に参加してきた話
ゲームコミュニティサミット2014に参加してきた話ゲームコミュニティサミット2014に参加してきた話
ゲームコミュニティサミット2014に参加してきた話
 
ゲームコミュニティサミット2014「*いどのなかにいる*」
ゲームコミュニティサミット2014「*いどのなかにいる*」ゲームコミュニティサミット2014「*いどのなかにいる*」
ゲームコミュニティサミット2014「*いどのなかにいる*」
 
札幌ゲーム製作者コミュニティKawaz「いどのなかにいる」
札幌ゲーム製作者コミュニティKawaz「いどのなかにいる」札幌ゲーム製作者コミュニティKawaz「いどのなかにいる」
札幌ゲーム製作者コミュニティKawaz「いどのなかにいる」
 
Kawaz Hipchat超入門
Kawaz Hipchat超入門Kawaz Hipchat超入門
Kawaz Hipchat超入門
 
Kawaz Third Impact
Kawaz Third ImpactKawaz Third Impact
Kawaz Third Impact
 
Decksetがよかった話
Decksetがよかった話Decksetがよかった話
Decksetがよかった話
 
Unite Japanに参加してきた話
Unite Japanに参加してきた話Unite Japanに参加してきた話
Unite Japanに参加してきた話
 
nomad-cliの紹介
nomad-cliの紹介nomad-cliの紹介
nomad-cliの紹介
 
cocos2d-x 3.0 + C++11で始めるゲーム開発超入門
cocos2d-x 3.0 + C++11で始めるゲーム開発超入門cocos2d-x 3.0 + C++11で始めるゲーム開発超入門
cocos2d-x 3.0 + C++11で始めるゲーム開発超入門
 
VOXCHRONICLE企画草案
VOXCHRONICLE企画草案VOXCHRONICLE企画草案
VOXCHRONICLE企画草案
 
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
〜ゲーム制作を始めてみよう〜 Kawaz入会希望者向けスライド
 
Kawaz的jQuery入門
Kawaz的jQuery入門Kawaz的jQuery入門
Kawaz的jQuery入門
 
Kobold2Dで始めるゲーム開発
Kobold2Dで始めるゲーム開発Kobold2Dで始めるゲーム開発
Kobold2Dで始めるゲーム開発
 
【TDDBC2.1】やる夫で学ぶTDD
【TDDBC2.1】やる夫で学ぶTDD【TDDBC2.1】やる夫で学ぶTDD
【TDDBC2.1】やる夫で学ぶTDD
 
はてな技術勉強会 #4LT「札幌ゲーム制作者コミュニティKawaz」について
はてな技術勉強会 #4LT「札幌ゲーム制作者コミュニティKawaz」についてはてな技術勉強会 #4LT「札幌ゲーム制作者コミュニティKawaz」について
はてな技術勉強会 #4LT「札幌ゲーム制作者コミュニティKawaz」について
 
はてなインターンシップ2011、ワークショップ発表プレゼン
はてなインターンシップ2011、ワークショップ発表プレゼンはてなインターンシップ2011、ワークショップ発表プレゼン
はてなインターンシップ2011、ワークショップ発表プレゼン
 
cocos2で始める iPhoneゲーム開発入門
cocos2で始める iPhoneゲーム開発入門cocos2で始める iPhoneゲーム開発入門
cocos2で始める iPhoneゲーム開発入門
 

Dernier

Dernier (20)

Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 

cocos2d入門

  • 10. 2011/6/25 10
  • 11. 2011/6/25 11
  • 12. 2011/6/25 12
  • 13. 2011/6/25 13
  • 14. 2011/6/25 14
  • 15. 2011/6/25 15
  • 16. 2011/6/25 16
  • 17. 2011/6/25 17
  • 18. 2011/6/25 18
  • 19. 2011/6/25 19
  • 20. 2011/6/25 20
  • 21. 2011/6/25 21
  • 22. 2011/6/25 22
  • 23. 2011/6/25 23
  • 24. / .::::::::::::::::::::::::;;:;;::, :::: l , rj,r '"'"'" l ::::::: Y ,! ::::::: | :::::::: | __ -- i::::,r `'' - ' ´ , }::;! , . """"´ L_ / i , /| r ≡ - ´ ,,.._ i 't-' | , ,r , yx=''" { ,- ; l ' r ' `-- /! ` _,, - '' ; ` -''"_,, -''" ;;' ,' / -''" ` '' ;;;;' ,' 2011/6/25 24 / _ =
  • 25. #import “YourScene.h” [[CCDirector sharedDirector] replaceScene: [YourScene scene]]; 2011/6/25 25
  • 26. #import “YourScene.h” id transition = [CCTransitionFade transitionWithDuration:0.5f scene:[YourScene scene]; [[CCDirector sharedDirector] replaceScene:transition]; 2011/6/25 26
  • 27. -(void) registerWithTouchDispatcher{ [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; } 2011/6/25 27
  • 28. - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{ // return YES; } 2011/6/25 28
  • 29. -(id) init{ if( (self=[super init])) { // create and initialize a Label CCLabelTTF *label = [CCLabelTTF labelWithString:@"Hello World" fontName:@"Marker Felt" fontSize:64]; // ask director the the window size CGSize size = [[CCDirector sharedDirector] winSize]; // position the label on the center of the screen label.position = ccp( size.width /2 , size.height/2 ); // add the label as a child to this Layer [self addChild: label]; self.isTouchEnabled = YES; } return self; } -(void) registerWithTouchDispatcher{ [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; } - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{ id transition = [CCTransitionFade transitionWithDuration:0.5f scene:[YourScene scene]; [[CCDirector sharedDirector] replaceScene:transition]; return YES; } 2011/6/25 29
  • 30. CCSprite sprite = [CCSprite spriteWithFile:@”sprite.png”]; // sprite.position = ccp(100, 100); // [self addChild:sprite]; // Sprite 2011/6/25 30
  • 31. // 240, 160 3 Action id move = [CCMoveTo actionWithDuration:3 position:ccp(240, 160)]; // 2 360 Action id rotate = [CCRotateBy actionWithDuration:2 angle:360]; // 4 127 Action id fade = [CCFadeTo actionWithDuration:4 opacity:127]; // Action Sequence CCSequence* sequence = [CCSequence actions:move, rotate, fade, nil]; // Sequence Sprite [sprite runAction:sequence]; 2011/6/25 31
  • 32. 2011/6/25 32
  • 33. 2011/6/25 33
  • 34. 2011/6/25 34
  • 35. 2011/6/25 35
  • 36. 2011/6/25 36
  • 37. 2011/6/25 37
  • 38. 2011/6/25 38
  • 39. 2011/6/25 39
  • 40. 2011/6/25 40
  • 41. 2011/6/25 41

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n