1.CCComController是一个继承CCComponent,CCInputDelegate的控制类,需要实现的方法有onEnter()--进入时回调函数 onExit()--退出时的操作
init()初始化数据操作 update() 数据更新操作等
2.CCAttribute保存一些数据,通过m_pOwner()->getComponent("ComAttribute")来获得一个操作指针;
CCAudio音乐操作,通过m_pOwner()->getComponent("Audio")来得到操作指针;
m_pOwner是一个CCNode指针,他在加入组件的时候会通过组件container来初始化
m_pOwner通过getParent()->getComponent()来得到某个节点然后进行操作
m_pOwner->removeFromParentAndCleanup(bool);删除当前父节点中的此节点并清除动作
3.通过初始化一个CCSprite,然后通过Sprite->addComponent(CCComcontroller);然后就是用这个controller来操作该sprite。