Cocos2D:对象组成和CCSpriteBatch [英] Cocos2D: Object Composition and CCSpriteBatch

查看:204
本文介绍了Cocos2D:对象组成和CCSpriteBatch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Cocos2d中进行对象组合的实验,灵感来自Steffen Itterheim编写的漂亮的Cocos2D书籍。在此主题中有一个关于此技术的讨论(第二篇帖子及以下内容: http:// www .cocos2d-iphone.org / forum / topic / 66219 )。

I am trying to experiment with object composition in Cocos2d, inspired by the nice Cocos2D book written by Steffen Itterheim. There is a discussion about this technique in this thread (second post and below: http://www.cocos2d-iphone.org/forum/topic/66219).

无论如何,我已经停下来 - 我是假设我不能使用CCSpriteBatchNode不增加我的代码的很多复杂性?我的意思是,我需要至少在实例化任何对象之前设置一个批处理节点。所以我添加了一个外部依赖我的组成类,可能使事情进一步沿着道路复杂化。

Anyhow, I have come to an halt - am I right in assuming that I cannot use CCSpriteBatchNode without adding a lot of complexity to my code? I mean, I need at least to setup a batch node before instantiating any object. So I am adding an external dependency to my composed class that might complicate things further along the road.

有任何人使用对象组成与Cocos2D,可以分享她/他提示?

Is anybody out there using object composition with Cocos2D and can share her/his tips?

谢谢!

推荐答案

问题:具有组合和CCSpriteBatchNode的游戏对象

这篇关于Cocos2D:对象组成和CCSpriteBatch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆