该文被密码保护。 阅读全文
posted @ 2021-07-08 10:30 qcjdp 阅读(33) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2022-02-21 10:24 qcjdp 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 函数指针变量可以作为某个函数的参数来使用的,回调函数就是一个通过函数指针调用的函数。 简单讲:回调函数是由别人的函数执行时调用你实现的函数。 以下是来自知乎作者常溪玲的解说: 你到一个商店买东西,刚好你要的东西没有货,于是你在店员那里留下了你的电话,过了几天店里有货了,店员就打了你的电话,然后你接到 阅读全文
posted @ 2022-01-17 17:57 qcjdp 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1.在编辑器给物体替加一个刚体(cc.RigidBody),类型:动态,静态 2.在编辑器给物体加一个形状 3.编写脚本开启物理引擎(一般挂在根节点) 1.打开物理引擎 cc.director.getPhysicsManager().enabled = true 2.配置物理引擎中的重力大小 cc. 阅读全文
posted @ 2021-12-24 11:13 qcjdp 阅读(601) 评论(0) 推荐(0) 编辑
摘要: //缓动 cc.tween(bNode).to(1, { position: new cc.Vec3(bNode.x+600*Math.cos(-this.radian),bNode.y+600*Math.sin(-this.radian)) ,opacity:0 } ). call(()=>{ b 阅读全文
posted @ 2021-12-22 14:14 qcjdp 阅读(290) 评论(0) 推荐(0) 编辑
摘要: //根据固定点,将捕捉到的鼠标事件,世界坐标转换成节点坐标 var position = this.node.parent.convertToNodeSpaceAR(e.getLocation()) // 该点所在的方位 (cos, sin) 获取方位 let direction:cc.Vec2=p 阅读全文
posted @ 2021-12-17 15:55 qcjdp 阅读(399) 评论(0) 推荐(0) 编辑
摘要: let a=[]console.log(a)a.push(1) 控制台显示是空数组, 实际展开会有值 阅读全文
posted @ 2021-10-25 11:48 qcjdp 阅读(317) 评论(0) 推荐(0) 编辑
摘要: <div style='height:9999px;'></div> <script type="text/javascript">// 防抖function debounce(func, wait=0) { if (typeof func !== 'function') { throw new T 阅读全文
posted @ 2021-09-29 17:02 qcjdp 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 客户端 ssh-keygen -t rsa -C "你的邮箱@XXX.com" 阅读全文
posted @ 2021-09-03 15:54 qcjdp 阅读(28) 评论(0) 推荐(0) 编辑
摘要: let client = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? '手机端' : 'pc端' ; 阅读全文
posted @ 2021-08-25 12:00 qcjdp 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1.首先执行以下命令安装 style-resources-loader; vue add style-resources-loader 2.然后安装scss/sass,node-sass sass-loader sass 属于重要依赖,所以需-D而不是-S; 注意版本 sass-loader": " 阅读全文
posted @ 2021-08-13 16:46 qcjdp 阅读(683) 评论(0) 推荐(0) 编辑

Bill

Jerry

Evil