SlideShare uma empresa Scribd logo
1 de 6
NSArray *resourceNames = [NSArray arrayWithObjects:
                          @"1.png",
                          @"2.png",
                          @"3.png",
                          @"4.png",
                          nil];
// Load finished selector
CCSendMessages *message = [CCSendMessages actionWithTarget:self];
// CCSendMessage       loadComplete
[[message addMessage] loadComplete];



     CCSendMessage
CCResourceAsyncLoader

loader = [CCResourceAsyncLoader
          loaderWithCount:[resourceNames count]];
loader.tag = kTag_CCRAL_Test_Loader;




    → loader.resourceCount
                          tag
// regist load resource file
for (NSString *path in resourceNames) {
    [loader addLoadAsyncTexture:path message:message];
}


           addLoadAsyncTexture
CCResourceAsyncLoader

   // execute loader
   [self addChild:loader];

addChild
- (void) loadComplete {

    CCNode *obj = [self getChildByTag:kTag_CCRAL_Test_Loader];
    CCResourceAsyncLoader *loader = (CCResourceAsyncLoader *)obj;

    loader.resourceCount--;
                              CCResourceAsyncLoader
                                  resourceCount                     -1


    // Load Complete!!
    if( loader.resourceCount == 0 ) {

    }
}                                 resourceCount = 0

Mais conteúdo relacionado

Mais procurados

Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
Giedrius Rimkus
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
Cosmin Mereuta
 

Mais procurados (19)

Thinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.jsThinking in Sequences - Streams in Node.js & IO.js
Thinking in Sequences - Streams in Node.js & IO.js
 
OpenStack Log Mining
OpenStack Log MiningOpenStack Log Mining
OpenStack Log Mining
 
Gnocchi v4 (preview)
Gnocchi v4 (preview)Gnocchi v4 (preview)
Gnocchi v4 (preview)
 
Node36
Node36Node36
Node36
 
Subversion To Mercurial
Subversion To MercurialSubversion To Mercurial
Subversion To Mercurial
 
Gnocchi Profiling v2
Gnocchi Profiling v2Gnocchi Profiling v2
Gnocchi Profiling v2
 
MongoDB Quick Reference Card
MongoDB Quick Reference CardMongoDB Quick Reference Card
MongoDB Quick Reference Card
 
Unqlite
UnqliteUnqlite
Unqlite
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an action
 
Cheep microservices
Cheep microservicesCheep microservices
Cheep microservices
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
Dive into Chef
Dive into ChefDive into Chef
Dive into Chef
 
Groovy component
Groovy componentGroovy component
Groovy component
 
Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
 
Gnocchi v4 - past and present
Gnocchi v4 - past and presentGnocchi v4 - past and present
Gnocchi v4 - past and present
 
Devoxx 2016 talk: Going Global with Nomad and Google Cloud Platform
Devoxx 2016 talk: Going Global with Nomad and Google Cloud PlatformDevoxx 2016 talk: Going Global with Nomad and Google Cloud Platform
Devoxx 2016 talk: Going Global with Nomad and Google Cloud Platform
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
 

Destaque

Destaque (6)

ALGO.JS DemoDay
ALGO.JS DemoDayALGO.JS DemoDay
ALGO.JS DemoDay
 
Cocos2d-x(JS)の紹介
Cocos2d-x(JS)の紹介Cocos2d-x(JS)の紹介
Cocos2d-x(JS)の紹介
 
Cocos2d-xにおけるモバイル開発〜将来を見据えた開発〜
Cocos2d-xにおけるモバイル開発〜将来を見据えた開発〜Cocos2d-xにおけるモバイル開発〜将来を見据えた開発〜
Cocos2d-xにおけるモバイル開発〜将来を見据えた開発〜
 
Cocos2d-x(JS) ハンズオン #01 「はじめてのCocos2d-x (JS)」
Cocos2d-x(JS) ハンズオン #01 「はじめてのCocos2d-x (JS)」Cocos2d-x(JS) ハンズオン #01 「はじめてのCocos2d-x (JS)」
Cocos2d-x(JS) ハンズオン #01 「はじめてのCocos2d-x (JS)」
 
Cocos2d-xで画像周りを自由自在に表示してみよう
Cocos2d-xで画像周りを自由自在に表示してみようCocos2d-xで画像周りを自由自在に表示してみよう
Cocos2d-xで画像周りを自由自在に表示してみよう
 
DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方
 

Semelhante a CCResourceAsyncLoader

Introduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET DriverIntroduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET Driver
MongoDB
 
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCABeginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Whymca
 
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
Qiangning Hong
 
Additional action script 3.0
Additional action script 3.0Additional action script 3.0
Additional action script 3.0
Brian Kelly
 

Semelhante a CCResourceAsyncLoader (20)

I os 13
I os 13I os 13
I os 13
 
Lazy Loading Because I'm Lazy
Lazy Loading Because I'm LazyLazy Loading Because I'm Lazy
Lazy Loading Because I'm Lazy
 
High Performance Core Data
High Performance Core DataHigh Performance Core Data
High Performance Core Data
 
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
 
Kitura Todolist tutorial
Kitura Todolist tutorialKitura Todolist tutorial
Kitura Todolist tutorial
 
Introduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET DriverIntroduction to the New Asynchronous API in the .NET Driver
Introduction to the New Asynchronous API in the .NET Driver
 
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCABeginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On Rails
 
Microservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-dockerMicroservices blue-green-deployment-with-docker
Microservices blue-green-deployment-with-docker
 
Core Data with multiple managed object contexts
Core Data with multiple managed object contextsCore Data with multiple managed object contexts
Core Data with multiple managed object contexts
 
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
 
Advanced cocos2d
Advanced cocos2dAdvanced cocos2d
Advanced cocos2d
 
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
 
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプCocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
 
Getting Started with Amazon ECS
Getting Started with Amazon ECSGetting Started with Amazon ECS
Getting Started with Amazon ECS
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
 
Additional action script 3.0
Additional action script 3.0Additional action script 3.0
Additional action script 3.0
 
Building Cloud-Backed Mobile Apps (MBL402) | AWS re:Invent 2013
Building Cloud-Backed Mobile Apps (MBL402) | AWS re:Invent 2013Building Cloud-Backed Mobile Apps (MBL402) | AWS re:Invent 2013
Building Cloud-Backed Mobile Apps (MBL402) | AWS re:Invent 2013
 
solving little problems
solving little problemssolving little problems
solving little problems
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl
 

Mais de Keisuke Hata

How To Build Last Fm For I Phone
How To Build Last Fm For I PhoneHow To Build Last Fm For I Phone
How To Build Last Fm For I Phone
Keisuke Hata
 
Mercurial&OnenoteServer
Mercurial&OnenoteServerMercurial&OnenoteServer
Mercurial&OnenoteServer
Keisuke Hata
 

Mais de Keisuke Hata (20)

Gcs2014 0225 cocos2d-xjsb
Gcs2014 0225 cocos2d-xjsbGcs2014 0225 cocos2d-xjsb
Gcs2014 0225 cocos2d-xjsb
 
apportable meeting
apportable meetingapportable meeting
apportable meeting
 
iOS app hacks all_map
iOS app hacks all_mapiOS app hacks all_map
iOS app hacks all_map
 
iOS app hacks
iOS app hacksiOS app hacks
iOS app hacks
 
Cocos2d platforms
Cocos2d platformsCocos2d platforms
Cocos2d platforms
 
Photobook
PhotobookPhotobook
Photobook
 
TiPhotobook_en
TiPhotobook_enTiPhotobook_en
TiPhotobook_en
 
CCSendMessages introduction
CCSendMessages introductionCCSendMessages introduction
CCSendMessages introduction
 
Cocos2d Performance Tips
Cocos2d Performance TipsCocos2d Performance Tips
Cocos2d Performance Tips
 
Impact beginngers guide_1.19
Impact beginngers guide_1.19Impact beginngers guide_1.19
Impact beginngers guide_1.19
 
Introduction titanium
Introduction titaniumIntroduction titanium
Introduction titanium
 
Hello cocos2d ios
Hello cocos2d iosHello cocos2d ios
Hello cocos2d ios
 
Hello cocos2d ios
Hello cocos2d iosHello cocos2d ios
Hello cocos2d ios
 
Google wave2010
Google wave2010Google wave2010
Google wave2010
 
How To Build Last Fm For I Phone
How To Build Last Fm For I PhoneHow To Build Last Fm For I Phone
How To Build Last Fm For I Phone
 
Mercurial&OnenoteServer
Mercurial&OnenoteServerMercurial&OnenoteServer
Mercurial&OnenoteServer
 
Math1 Vector
Math1 VectorMath1 Vector
Math1 Vector
 
Wiipen
WiipenWiipen
Wiipen
 
Gl Rotate
Gl RotateGl Rotate
Gl Rotate
 
Gl Matrix
Gl MatrixGl Matrix
Gl Matrix
 

Último

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

CCResourceAsyncLoader

  • 1. NSArray *resourceNames = [NSArray arrayWithObjects: @"1.png", @"2.png", @"3.png", @"4.png", nil];
  • 2. // Load finished selector CCSendMessages *message = [CCSendMessages actionWithTarget:self]; // CCSendMessage loadComplete [[message addMessage] loadComplete]; CCSendMessage
  • 3. CCResourceAsyncLoader loader = [CCResourceAsyncLoader loaderWithCount:[resourceNames count]]; loader.tag = kTag_CCRAL_Test_Loader; → loader.resourceCount tag
  • 4. // regist load resource file for (NSString *path in resourceNames) { [loader addLoadAsyncTexture:path message:message]; } addLoadAsyncTexture
  • 5. CCResourceAsyncLoader // execute loader [self addChild:loader]; addChild
  • 6. - (void) loadComplete { CCNode *obj = [self getChildByTag:kTag_CCRAL_Test_Loader]; CCResourceAsyncLoader *loader = (CCResourceAsyncLoader *)obj; loader.resourceCount--; CCResourceAsyncLoader resourceCount -1 // Load Complete!! if( loader.resourceCount == 0 ) { } } resourceCount = 0

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n