Cocostudio Use note 2:cocos2dx3.9 to use Cocostudio made progress bar Loadingbar

Source: Internet
Author: User

As a rookie has been using the handwriting COCOS2DX interface, has recently been studying cocostudio this tool. Try to use tools to quickly develop the game, tossing for one weeks, every day to search for information.

Record my trial Cocostudio production of the start-up interface encountered problems and experience, convenient for later review.

First set the resolution of the editor to 480*800 the size of the Android resolution.

Add a sprite wizard to use a picture of size 480*800 (background.png) as the background, then Add Sprite Wizard as the game logo (logo.png), continue to add sprite as the background of the progress bar (Loading_ Bj.png), then add a progress bar control (loadingbar.png) above the background of the progress bar, set the progress bar progress to 1%, the progress bar direction type is left to right, and finally add a text label above the progress bar control to display the progress bar progress value.

650) this.width=650; "title=" 1453218710743857.png "alt=" QQ20160119-1@2x.png "src=" http://www.byjth.com/content/ Uploadfile/ueditor/upload/image/20160119/1453218710743857.png "/>

After editing the scene in Cocostudio, we publish the CSB file by publishing and packaging in the Project menu.

Finally we read the CSB file in COCOS2DX and use the controls interactively.

The main goal of this blog: 1, loading Cocostudio released the CSB file. 2. Automatically change the progress bar and label text display value.


1. Loading the CSB file in COCOS2DX

Referring to the previous blog post

Cocostudio using note 1:cocos2dx3.4 to load Cocostudio exported CSB files

Http://www.byjth.com/tools/41.html


2, automatically change the progress bar to change the status value and label display value

Referring to a previous blog post,

COCOS2DX Learning Notes 12:COCOS2DX progress bar (Progresstimer)

Http://www.byjth.com/biji/32.html


I'll post the implementation code for this time.

650) this.width=650; "title=" 1453219765487671.png "alt=" cocos2dx3.9 use Cocostudio made progress bar loadingbar.png "src="/HTTP/ Www.byjth.com/content/uploadfile/ueditor/upload/image/20160120/1453219765487671.png "/>

650) this.width=650; "title=" 1453219884315423.png "alt=" cocos2dx3.9 use Cocostudio made progress bar loadingbar.png "src="/HTTP/ Www.byjth.com/content/uploadfile/ueditor/upload/image/20160120/1453219884315423.png "/>

Through the simple code we can get a very beautiful loading scene, of course, the exquisite degree of the picture and art has a great relationship.

Here my Xcode simulator is set to 480*800. Start the emulator to preview the final effect.

650) this.width=650; "title=" 1453220063136069.gif "alt=" progress bar. gif "src=" http://www.byjth.com/content/uploadfile/ Ueditor/upload/image/20160120/1453220063136069.gif "/>

So far as I am? You can create a beautiful scene with a few simple lines of code, and of course the particle effects are used in this image. Because there is no need for interaction, there is no explanation here, there is time for us to introduce the application of the next scene automatically after the completion of the progress bar loading.


Cocostudio Use note 2:cocos2dx3.9 to use Cocostudio made progress bar Loadingbar

Http://www.byjth.com/tools/43.html


This article is from the "Close your eyes on the Dark" blog, please be sure to keep this source http://byjth.blog.51cto.com/4127898/1758977

Cocostudio Use note 2:cocos2dx3.9 to use Cocostudio made progress bar Loadingbar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.