cocos2dx 实用小技巧

Menu 的 是个 很方便的 按钮 

c2dx 默认为 MenuItemLabel 添加的 按下 变大 的 动画

却没有 给 MenuItemSprite 提供这样的效果

如果 自己 不想 封装新的 动画的话 

其实 可以 直接用 MenuItemLabel 来做 

static CCMenuItemLabel* create(CCNode *label);

MenuItemLabel 是可以 直接 传入 一个 Node 的 , 所以 直接传入 一个 Sprite 就可以了.

原文地址:https://www.cnblogs.com/jaoye/p/4188612.html