![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Cocos Creator
丶有时会悲伤
太懒。
展开
-
【Cocos Creator实战】跳跃的肖恩
场景向前移动 移动到一定像素后,再回到原位 //不断修改x轴坐标 //获取当前节点x的坐标 var x = this.node.x; //x + 当前帧该移动的距离 x += this.speed*dt; //运行当前帧的时间 //当前位置小于重置位置,重置x if(x<=this.resetX){ x -= this.resetX; } this.node.x = x; ...原创 2020-03-09 02:06:53 · 772 阅读 · 0 评论 -
【Cocos Creator实战】跳跃的肖恩一
场景向前移动 移动到一定像素后,再回到原位 //不断修改x轴坐标 //获取当前节点x的坐标 var x = this.node.x; //x + 当前帧该移动的距离 x += this.speed*dt; //运行当前帧的时间 //当前位置小于重置位置,重置x if(x<=this.resetX){ x -= this.resetX; } this.node.x = ...原创 2020-02-20 21:52:43 · 311 阅读 · 0 评论