demibug

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  24 Posts :: 3 Stories :: 2 Comments :: 0 Trackbacks
  1. CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();  
  2.     cache->addSpriteFramesWithFile("test.plist""test.png");  
  3.       
  4.     /* 创建Sprite */  
  5.     CCSprite* s1 = CCSprite::createWithSpriteFrame(cache->spriteFrameByName("g_good.png"));  
  6.       
  7.     s1->setPosition(ccp(100, 100));  
  8.     addChild(s1);  
  9.       
  10.     CCSprite* s2 = CCSprite::createWithSpriteFrame(cache->spriteFrameByName("musicBtn.png"));  
  11.       
  12.     s2->setPosition(ccp(300, 300));  
  13.     addChild(s2); 
posted on 2013-03-10 16:38 Hiji 阅读(3530) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: