Use the HelloCpp project to modify the code:
#ifndef __HELLOWORLD_SCENE_H__#define __HELLOWORLD_SCENE_H__#include "cocos2d.h"class HelloWorld : public cocos2d::CCLayer{public: virtual bool init(); static cocos2d::CCScene* scene();
1. Create a project
Version 3.0 supports Python command line and cocos2d-x-3.0beta2 \ tools \ project-creator \ create_project.py tools to create projects, 3.0beta new support for custom project directories. There are a lot of online information on
If the development environment does not have the reflection function, it takes a lot of effort to rename the code. The following code replaces variable names in batches. Modify many situations that can be used for code conversion.
This article is
/* * Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com * * iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com * * This software is provided 'as-is', without any express or implied * warranty. In no event
Hello everyone!
Here I am introducing the original method of editing, I personally think it is also a more general method, whether it is now cocos2d-x 2.2 or cocos2d-x 3.0 version is the same
First, we will introduce the android compilation process:
In our game development, apart from the UI being the top priority, music is also an indispensable part.
Because people have two eyes and ears.
Now let's take a look at the introduced library files, which is relatively simple in general.
First
1. Data Structure Selection
// The efficiency of array insertion and deletion is low; the efficiency of searching and traversing is high.// High efficiency of list insertion and deletion; low efficiency of searching and traversing// Add or
Node class (CCNode)
The node class is the main class in the Cocos2D-X, inherited from CCObject, as shown in the inheritance relationship.
Any object that needs to be painted on the screen is a node class. The most common node classes include
Animation Speed Control in Cocos2d-x. Animation speed control is when the animation is fast and slow.
BytesEasy and leisurely. In API, it should be understood as slow.
Exponential Index. Exponential Growth: This growth speed is faster than
Original article: Building a Tizen App With Sencha Touch
Author:Gautam AgrawalGautam Agrawal is Sencha's Sr. product Manager for Frameworks (Ext JS, Touch, and GXT ). he has held various product and engineering roles at Quantros and Integral, in
Cocos2d-x 2.20 and later versions do not have to create a template, the method to create instead of Python to create, the method is as follows:
Python create_project.py-project HelloWorld-package com. Panda. Game-language cpp
To create a lua project,
1. The current class inherits public cocos2d: CCTextFieldDelegate to implement delegated listening.
2. Declare in. h:
// Rewrite the callback function of CCTextFieldDelegate.// Callback function when the user starts the virtual keyboard// You must
A hero can now launch a bullet, but it's just a decoration. How can we kill a monster? This effect will be achieved based on collision detection. 1. cache monsters and bullets first, tracking monsters and bullets is required. In the game, we use
I haven't updated my blog for a while. I think the level is really enough and I can't bear it out ~~~~Yesterday, cocos2dx 3.0 beta was released. I used alpha1 for a week or two before, so I decided to write some blog posts about 3.0, not only do I
Cocos2d-x is based on the node tree rendering 2D engine and a method of drawing with commands, which is very common in the era of function machines ).
However, the node tree is a magic horse, and the node tree is a magic horse concept. Recently
I. Touch Screen events
In Coco2d-x, inheriting the touch screen proxy protocol CCTouchDelegate can detect touch screen events and call callback functions. Is the CCTouchDelegate class inheritance relationship diagram:
The simplest method is to use CCTextFieldTTF to set the graph password,
First, the class inheritance relationship
class Login:public cocos2d::CCLayer,CCIMEDelegate,CCTextFieldDelegate
There are several methods
// CCTextFieldDelegatevirtual
In the previous section, an genie is added to the game scenario. But a hero may be too lonely. We should add some enemies to defeat him. 1. Adding the void addTarget () function will help us complete this task. The enemy will move from the game
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