Cocos2d-x Custom button control genie attack ---- game development "zhao Yun to fight"
This article describes how to customize the button class and control the sprite attack through the icon class. Before reading this article, you 'd better check the previous article.
Cocos2d-x virtual Joystick Control genie up and down movement ---- game development "Zhao cloud to fight", to material and project code to le
Libgdx Box2D Practice --- release the ball (3: Combination of common body and genie Rules)
Today we will introduce how the rule body works with images. In the previous article, I introduced the basic knowledge of box2D. If you are careful, you will search for simple online demos. I will not write those. What should I do if I use an image to represent my body instead of a simple line?
Next, I will take the small ball object generation in my project a
Batch Processing genie in Cocos2d-X
Batch Processing genie using common methods
Add the following code to Sprite. h:
# Ifndef _ Sprite_SCENE_H __# define _ Sprite_SCENE_H __# include "cocos2d. h "USING_NS_CC; class Sprite: public CCLayer {public: // initialization layer bool init (); // create a scenario static CCScene * scene (); // respond to the touch bool Sprite :: ccTouchBegan (CCTouch * touch, CCEvent
Zoder:
1. It is the value describing the rendering order. Each ccnode has a zoder. The default value is 0.
2. The greater the zoder, the more it will be drawn later. If the zoder value is the same, it depends on the order of arrival (global variable plus one each time). The first added node is drawn first, zoder only compares nodes with the same parent node.
Tag: ID card of a node. It is convenient to get the Node object through getchildbytag. Its significance is to reduce the member variables.
Zookeeper
I have been looking at the controls over the past few days and have not figured out how to use them. There are already many examples of this on the Internet, so I will not write it. The next step is to learn about the genie class. If you learn the genie class independently, it is very easy. So I added some animation-related knowledge points and used them together to let the
[Cocos2d-x Study Notes] Three Types of texts, batch processing genie, C ++ four cast, cocos2d-xcast
Three types of display text
CCLabelTTF, CCLabelAtlas, CCLabelBMFont
CCLabelTTF: a texture is generated for each character string in the system font, resulting in low display efficiency. Suitable for non-changing text
CCLabelAtlas: Uses NodeAtlas to optimize rendering and is suitable for frequently changing numbers, such as scores and money.
CCLabelBMFo
In the cocos2d-x, you want to move an genie from its original position to the point the user is touched by, and rotate the radian in the direction of the genie, for more information, see my practice. Here, the genie uses a fish. After a user touches the fish, the fish is moved to the point touched, at the beginning of the Movement, the direction of the fish head
First, let's look at the Code:
[Cpp]Void GameEnemyBullet: setvisable (){This-> setVisible (true); // sets the sprite visibility.Isvisable = true;This-> runAction (CCJumpTo: create (3, CCPointMake (500,500), 30, 5); // let the genie perform the Skip actionCCMessageBox ("over", "over"); // pop up a small window to verify whether the operation is performed here}
Void GameEnemyBullet: setvisable (){This-> setVisible (true); // sets the sprite visibility.I
Namespace macro:USING_NS_CC.NS_CC_BEGIN; = using namespace cocos2d {NS_CC_END ;}
--------------------------------------------------------------------------------
Judge whether an genie is clicked:1. The layer needs to receive click messages. 2. Obtain the click coordinate in the callback function. 3. Use the boudingBox (). containsPoint function to judge the result. (Or use the convertTouchToNodeSpaceAR method)
----------------------------------------
Today, I wrote a driver genie, and a few lines of code are complete. Although simple, it is very useful, many games developed using java and android use more or less the simple code.
Packagecom. csdn. code;
Importjava. awt. Color;
Importjava. awt. Frame;
Importjava. awt. Graphics;
Importjava. awt. event. WindowAdapter;
Importjava. awt. event. javaswevent;
Public classDriveElf extends Frame {
Private int x = 40; // the initial position of the
Who knows about my loneliness in the dark? How can I create an online TV genie?
The annual Internet TV genie project kicked off again in 2014. At present, there is a mixture of joy, pain, melancholy, loss, and many reluctance.
But it's coming to an end. Then, where should we go for S2218 ......
Continue to cheer up, or give up permanently ??? Maybe giving up is also a kind of beauty.
What did the online TV
capabilities, can better help players develop the village. In addition to the development of the blue genie village, players can also play some mini games. For example, cooking food, making medicines, and drawing portraits. The Game will also integrate the Facebook and Game Center features to allow players to share pictures of their games with friends. This fresh style and interesting mini game, as well as convenient Offline ManagementGenieAnd easy s
Lame frog note 19-cocos2d-x-3.2 screen lock genie Movement
Previous review
In the previous article, he learned how to use OrbitCamera and learned about it. Although the parameters in the OrbitCamera: create Function are difficult to understand, we can explain them in an abstract way. Haha, this time I learned how to lock the running of the genie with the screen.
Introduction
First, let's look at the inher
Understanding of cocos2d-x ios game development (5) CCsprite genie, cocos2d-xccsprite
This time I will write several types created by the genie:
1. Create a file:
Add the following code on the original basis:
// 1. Create an genie through a file
CCSprite * bg = CCSprite: create ("map.png ");
CCSize winSize = CCDirector: sharedDirector ()-> getWinSize (); // obta
Many people use the buttons to play online games.
Who would have thought that the press Key genie could be used in a single-host game?
Let me give you a few examples.
1. Role-playing RPG-obviously, leveling is boring. Especially in the later stages of the game, it is entirely possible to kill many enemies before they can be upgraded. It is entirely possible to write an automatic leveling program with a key-based
Inconsistency between the Tongda OA web page and the updated content displayed by the genie
This problem was found in the previous section, that is, the updated information in the developed phone query, but the original information is displayed in the Wizard dialog box, in this way, the new development portal cannot be used to update information. At first, I thought it was a factory upgrade. I changed the structure of the stored table. I felt that al
Andengine has a built-in tiledsprite class that can pass in the texture of tiledtextureregion to construct an animated sequence image that can be played continuously. However, sometimes in game project development, there is a huge workload for the artist, and this tiled also brings about the workload when it needs to be modified. In cocos2d of iPhone, the genie class has a runaction method that can play a group of sequential images to achieve the anim
Game, no picture, no picture, can be called a game, so we should first look at how to create a genie using quick. The quick API explains how to create the genie in detail, so it is very easy to create. Display. newsprite (filename, X, Y, Params) Filename: SPRITE file name X: X coordinate Y: Y coordinate Params: Table parameters (not commonly used) We can add the X and Y parameters for convenience
The inconsistency between the Tongda OA web page and the updated content displayed by the genie occurs.
This problem was found in the previous section, that is, the updated information in the developed phone query, but the original information is displayed in the Wizard dialog box, in this way, the new development portal cannot be used to update information. At first, I thought it was a factory upgrade. I changed the structure of the stored table. I
I used to install the restore genie 6.1. Due to system problems, I re-went to go to an XP portal. When go restarts and enters the system configuration, the restore genie was damaged, the system installation cannot be completed, and then I start to reinstall the system with the original version of XP, or not .... dizzy! I 'd like to think about it: do not install XP after starting with a boot disk, but first
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.