cocos2d-x 动画详解之五CCAnimation,

本文介绍了Cocos2d-x中CCAnimation类及其用途,包括如何使用CCAnimation实现CCSprite对象上的动画效果,以及CCAnimationCache类的作用,即管理和缓存一系列动画资源。

CCAnimation

用于演示动画在CCSprite上 动画有自己的名称 比如兔子跳 兔子跑

包含若干个CCSpriteFrame

 

CCAnimation object is used to perform animations on the CCSprite objects.

The CCAnimation object contains CCSpriteFrame objects, and a possible delay between the frames. You can animate a CCAnimation object by using the CCAnimate action. Example:

[sprite runAction:[CCAnimate actionWithAnimation:animation]];

 

CCAnimationCache

用与一组动画的管理

Singleton that manages the Animations.

It saves in a cache the animations. You should use this class if you want to save your animations in a cache.

 

 


转载于:https://www.cnblogs.com/afly/archive/2012/03/06/2382321.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值