Most of the time, our games may need to be shared to Weibo or some communities. If the shared content is only some text, the effect may not be very good, if you can add a game to the shared content, it will be very nice. For example, if you catch a big shark in the fishing talents and win the first place in the cool run, I believe that the game screen for that moment is very precious to you. so, I
Most of the time, our games may need to be shared to Weibo or some communities. If the shared content is only some text, the effect may not be very good, if you can add a game to the shared content, it will be very nice. For example, if you catch a big shark in the fishing talents and win the first place in the cool run, I believe that the game screen for that moment is very precious to you. so, I
Most of the time, our games may need to be shared to Weibo or some communities. If only some text is shared, the effect may not be very good.
The game is very nice. For example, if a fisherman catches a big shark and wins the first place in the cool run, I believe that the game screen for that moment is very precious to you. so, how can we
Extract the current game image and run the Code directly:
Void YourClassName: SaveScreenshot () {CCSize size = CCDirector: sharedDirector ()-> getWinSize (); CCRenderTexture * texture = CCRenderTexture: create (int) size. width, (int) size. height); texture-> setPosition (ccp (size. width/2, size. height/2); texture-> begin (); CCDirector: sharedDirector ()-> getRunningScene ()-> visit (); texture-> end (); texture-> saveToFile ("screenshot.png", kCCImageFormatPNG );}