Giter VIP home page Giter VIP logo

objectpool-cocos2d-x's Introduction

ObjectPool-cocos2d-x

面向cocos2dx的对象池

1.ObjectPool是一个cocos2d-x的对象池模版基类。

2.继承于ObjectPool可以实现不同cocos2d-x类型的对象池,这里实现了一个精灵类型的对象池SpritePool。

3.这里的对象池并不只是cocos2d-x底层的引用计数对象池,是基于底层引用计数的封装,放在对象池里的对象保留了所有属性及占用内存。

4.在lua中使用该对象池需要进行lua-binding,这里给出已生成的绑定文件。

5.可以对其扩展,继承于ObjectPool的其他cocos2d-x类型的对象池,SpritePool只是抛砖引玉。

使用

我的开发环境是cocos2d-x + lua,在lua中使用对象池,需要进行绑定和注册。 以我的项目为例:

1,把ObjectPool和lua-bindings路径下的文件加入项目中。

2,入口文件处注册。

register_all_cocos2dx_spritepool(L);

3,lua中使用。

objectpool-cocos2d-x's People

Contributors

guodipan avatar gdsgtcz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.