Advertisement
bynaki

FadeIn

Mar 6th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. bool HelloWorld::init()
  2. {
  3.     if(!Layer::init())
  4.     {
  5.         return false;
  6.     }
  7.  
  8.     auto spr = Sprite::create("Icon-57.png");
  9.     spr->setPosition(Point(100, 100));
  10.     spr->setOpacity(0);
  11.     this->addChild(spr);
  12.  
  13.     auto action = FadeIn::create(3.0);
  14.     spr->runAction(action);
  15.  
  16.     return true;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement