Cocos2d-x 3.0
16 Mar 2014今天试着把代码升级至3.0,发现之前的CCArray的容器都变了,现在是使用Vector @sprites@ 内存管理是由编译器自动处理的,不要使用new来申请堆空间。 参考:http://cocos2d-x.org/docs/manual/framework/native/data-structure/v3/vector/zh http://cocos2d-x.org/docs/manual/framework/native/data-structure/v3/map/zh
cocos2d::Vector
cocos2d::Map<std::string, Node> nodes;
auto node1 = Layer::create():
auto node2 = Layer::create():
auto node3 = Layer::create():
auto node4 = Layer::create():
nodes.insert("node_1", node1)
nodes.insert("node_2", node1)
nodes.insert("node_3", node1)
nodes.insert("node_4", node1)