摘要:
Starting Activities and Getting ResultsThestartActivity(Intent)method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, anIntent, which describes the activity to be executed.Sometimes you want to get a result back from an activity whe 阅读全文
摘要:
1 public function render(stage3D:Stage3D):void { 2 var i:int; 3 var j:int; 4 var light:Light3D; 5 var occluder:Occluder; 6 // Error checking 7 if (stage3D == null) throw new TypeError("Parameter stage3D must be non-null."); 8 // Reset ... 阅读全文
摘要:
//============================================================================// Name : TestOpenGL.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//=======================================================================... 阅读全文
摘要:
//============================================================================// Name : TestOpenGL.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//=======================================================================... 阅读全文
摘要:
cocos2d-x中内置了很多的容器类,每个容器类都是容纳CCObject的对象,在对象被添加到容器中时,他的引用就增加了一。下面举一个例子说明:CCArray中有addObject方法,负责把一个CCObject对象添加到这个容器中,在使用addObject添加进来的对象的引用都会加一。void CCArray::addObject(CCObject* object){ ccArrayAppendObjectWithResize(data, object);}/** Appends objects from plusArr to arr. Capacity of arr is incr... 阅读全文
摘要:
在cocos2d-x中,CCNode的移动都是通过Action来执行的。下面介绍几款常见的Action,比如移动,旋转CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", TITLE_FONT_SIZE); // position the label on the center of the screen pLabel->setPosition(ccp(origin.x + visibleSize.width/2, origin.y + visib... 阅读全文