[The Path to COCOS-2D programming for a cainiao] preliminary use of the UIAccelerometer in COCOS2D

UIAccelerometer, in short, is to obtain the gravity sensing and displacement judgment and processing of the mobile phone. For example, shaking the mobile phone up or down will trigger the accelerator event. Today, we will learn how to use the

CCScene and CClayer in core coco2d-x

I. CCScene CCScene is a subclass of CCNode. It has one more feature than CCNode: it is used for its own anchor and is located in the center of the screen. In fact, it is just an abstract concept, essentially a CCNode   Define a new CCScene instance:

Cocos2d-x Game Development Series tutorial-display of virtual controllers for tank games

In the previous article, we had tanks, but we had no controllers and could not control the tanks. 1. In this article, we will write a virtual handle to control the tank. The header file contains the following content: #define RES_PADDLE_LEFT"paddle/

Cocos2d-x full screen adaptation

After reading the sample, you will experience cocos2dx in person, but it is inevitable that new people will encounter a dilemma. Although the beginning is bitter, it is wonderful after solving the problem. I made a small demo and used only one set

[7] CCAction for coco2d-x core class

CCAction is not an object displayed on the screen. CCAction must be attached to a CCNode instance to play its role. The CCAction class inheritance relationship is shown in figure CCAction has three subclasses: CCFiniteTimeAction, CCFollow, and

Cocos2dx Game Development Series notes 15.1: Add a virtual joystick SneakyInput

  (It seems that there is a problem with saving the csdn blog) (When I have finished saving all the files, I owe my hand to click the return button of the browser, and then the automatic saving of csdn is not easy to use, and now this note is the

Cocos2d-x tutorial (16)-Custom Action circular motion

 In the previous article we once talked about the use of various actions in the Cocos2d-x, we will first briefly review the content related to the Action 1. files for all the category classes in the Cocos2d-x are located under the

Cocos2dx socket communication

    Recently, in a real-time online interaction game, the game needs to use socket to maintain a persistent connection to ensure real-time interaction between the client and the server. Below are some of your code: The entire process is as follows: 1

Cocos2d-x Jni c ++ java Intermodulation and refreshing each other UI controls the simplest example (below)

    C ++ calls java:   C ++ calls java. Colleagues refreshed the android Edit View Control     Step 1: Step 2: Create a layout File Step 3:   Public static EditText myView; Step 4: Add a text input box   LayoutInflater inflater = (LayoutInflater)

Dynamic and cut pictures in cocos2d-x game

CCSize S = CCDirector: sharedDirector ()-> getWinSize (); // The texture image CCTexture2D * texture = CCTextureCache: sharedTextureCache () required for loading an animation () -> addImage ("Blowfish0.png"); // obtain the CCSpriteFrame * frame0 =

Android cookies are shared to WebView to avoid logon again (keep logon status)

Recently, you used webview to open a webpage with a specified link. You can set a cookie for webview but always go to the logon page, this is because the cookie is not successfully set, and webview does not send the configured cookie

Call of the cocos2d-x CCNode isRunning Function

For example, if the bullet exceeded the screen, we will remove the bullet from the removeChild layer. So, is there a status to determine whether the bullet has been removed? It is determined by the isRunning function. If the bullet is still in the

Application of layer in cocos2d-x

A Layer is used to present a specific object in a centralized manner. Generally, several layers are added to Scene to manage an activity. At this time, the layer carries the meaning of a container, and what should be drawn in this layer. The

Cocos2d-x CCAnimate animation playback time frame Problem

What is the frame buffer pool? What is the animation buffer pool? How do I play an animation frame by time frame? What if the interval between adjacent animation frames is different from the cocos2d-x? It's easy to use other plist files to

Example of cocos2dx game storage and precautions

Today, I will share with you about the storage of games in cocos2dx and what you need to pay attention to. cocos2dx comes with the storage class CCUserDefault. If you need to store a large amount of data, we recommend that you use databases for

Cocos2d-x loading UIWebView display web page

In 2dx, click the button to load the webpage and use UIWebView on ios to display it. This allows you to roll back and refresh the current page. In 2dx, call [cpp] HelloWebView * webview = [[HelloWebView alloc] initWithNibName: nil bundle: nil];

Yii Learning (1) ---- usage

1. Download and install Article 1.1 Add the downloaded yii framework source code to the php runtime environment. What is xampp used here? C: \ _ work \ xampp \ htdocs \ yii-core first, I have configured the local environment path to www.yii.com. How

Android uses socket for inter-process communication

Recently, decompilation looks at some android applications, especially those that involve underlying functions, such as game acceleration, memory modification, and host-mounted scripts. It is found that all communication mechanisms in these

How to Use helloworld to explain the programming ideas and key points of cocos2d-x

Using helloworld to explain the programming ideas and key points of cocos2d-x In this paper, the helloworld of cocos2d-x is used as an example to explain the characteristics and key points of the cocos2d-x engine. 2.2 in order to display the new

Android practices (1)

I remember that I was worried about which development language I used to develop android in the previous article. Recently I used C # To develop android, which is not so nice. It is not convenient to query information, so I decided to use java for

Total Pages: 5220 1 .... 3483 3484 3485 3486 3487 .... 5220 Go to: GO

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.