会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
newlist
博客园
::
首页
::
博问
::
闪存
::
新随笔
::
联系
::
订阅
::
管理
::
公告
2014年11月27日
创建敌人基类
摘要: class EnemyBase : public Sprite { public: virtual bool init() override; CREATE_FUNC(EnemyBase); Animation* createAnimation(std::s...
阅读全文
posted @ 2014-11-27 21:51 一枚程序
阅读(268)
评论(0)
推荐(0)
让精灵改变方向并前进
摘要: //让精灵动起来,并改变方向void EnemyBase::changeDirection(float dt) { auto curr = currPoint(); if(curr->getPositionX() > this->getPosition().x ) {...
阅读全文
posted @ 2014-11-27 15:54 一枚程序
阅读(217)
评论(0)
推荐(0)
给敌人精灵创建帧动画
摘要: //给精灵创建帧动画Animation* EnemyBase::createAnimation(std::string prefixName, int framesNum, float delay) { // 1 Vector animFrames; // 2 fo...
阅读全文
posted @ 2014-11-27 15:10 一枚程序
阅读(434)
评论(0)
推荐(0)