摘要: NGUI下给Sprite/image添加collider后能自适应大小,但是在UGUI下Collider是默认在(0,0)位置,size为0 因此写了个简单的脚本,效果如下(最后附代码) 1.如下图添加Box Collider 2D后的默认位置与大小 2.给需要的物体添加Script并运行后的效果: 阅读全文
posted @ 2018-09-16 20:00 QQW的进化之旅 阅读(2829) 评论(0) 推荐(0) 编辑
摘要: 环境:Win10 读取text内容后unity报错:Input string was not in the correct format 同时在Inspector面板中无法预览Text文本内容 随后发现只有文本中有中文才会出现这种情况 解决方法就是将Text另存为UTF-8编码格式 阅读全文
posted @ 2018-09-11 16:16 QQW的进化之旅 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class FollowTarget : MonoBehaviour { 6 7 private Trans 阅读全文
posted @ 2018-07-02 01:07 QQW的进化之旅 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 using UnityEngine.Playables; 5 6 public class Player : MonoBeha 阅读全文
posted @ 2018-07-01 23:41 QQW的进化之旅 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 参考书籍:《算法图解》《啊哈!算法》 1.二分查找 时间复杂度 log2(N) 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.T 阅读全文
posted @ 2018-06-22 14:54 QQW的进化之旅 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 官方文档: http://dotween.demigiant.com/index.php 一些DOTween方法的介绍 安装插件后也可以在Add Component里添加DOTween Animation / Path两个组件来可视化地编辑 1 using System.Collections; 2 阅读全文
posted @ 2018-06-12 22:21 QQW的进化之旅 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1.通过Slider设置图片的滑动时加载的效果 2.Image Type Image分为四个类型 Simple:有个Preserve Aspect,勾选后UI会保持相对大小而不是填充整个Canves Sliced:可以保证被切割的部分不会随着放大缩小而失真,需要在图片自身的Sprite Editor 阅读全文
posted @ 2018-06-10 20:34 QQW的进化之旅 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 using UnityEngine.UI; 5 6 public class MainUIControl : MonoBeha 阅读全文
posted @ 2018-06-06 21:38 QQW的进化之旅 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 1.库 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace CardLib 7 { 8 public enum Suit 9 { 10 阅读全文
posted @ 2018-05-25 12:00 QQW的进化之旅 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class RotateCirle : MonoBehaviour { 6 7 public float R 阅读全文
posted @ 2018-05-24 23:52 QQW的进化之旅 阅读(255) 评论(0) 推荐(0) 编辑