摘要: lua中的类型作一小记 print(type("Hello world")) --> string print(type(10.4*3)) --> number print(type(print)) --> function print(type(type)) --> function print( 阅读全文
posted @ 2018-01-03 15:46 叫我张先生 阅读(20223) 评论(0) 推荐(0) 编辑
摘要: 看了网上很多方法,都不奏效。 提供一个简单的方法,不妨一试! 打开其他版本unity,登陆你的账户,再打开unity2017即可! 阅读全文
posted @ 2017-12-27 14:18 叫我张先生 阅读(1677) 评论(0) 推荐(0) 编辑
摘要: 你可以这样 也可以这样 阅读全文
posted @ 2017-12-19 12:55 叫我张先生 阅读(1414) 评论(0) 推荐(0) 编辑
摘要: 常规利用反射进行克隆 但是当你克隆的字段中有引用类型的时候并不能真正的拷贝出一个新的如list 因此在SetValue的时候 你需要进行深度拷贝 代码如下可直接使用 使用的话就是在SetValue时 的oValue进行DeepClone即可 这样你就实现了深度拷贝 阅读全文
posted @ 2017-12-07 17:58 叫我张先生 阅读(1664) 评论(0) 推荐(0) 编辑
摘要: math.random([n [,m]]) 文档原版: this function is an interface to the simple pseudo-random generator function rand provided by ANSI C. (No guarantees can b 阅读全文
posted @ 2017-11-27 17:12 叫我张先生 阅读(779) 评论(0) 推荐(0) 编辑
摘要: 把你所需要遍历的table里的key按照遍历顺序放到另一个临时的table中去,这样只需要遍历这个临时的table按顺序取出原table中的key就可以了 阅读全文
posted @ 2017-10-31 20:30 叫我张先生 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 效果如下: 阅读全文
posted @ 2017-10-18 17:35 叫我张先生 阅读(3219) 评论(0) 推荐(0) 编辑
摘要: public class GameDataPreLoad { static private GameDataPreLoad _instance; static public GameDataPreLoad Instance { get { if (_instance == null) { ... 阅读全文
posted @ 2017-10-16 21:35 叫我张先生 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 今天在项目中遇到一个问题,我们的ui过来找我,问为什么Content里的Item显示的不完全 花了半个小时看了一下,发现个小小的坑,记录一下 这些属性是用来实现,Content下的Item的偏移和间隔(是用来实现每个物体之间的间隔不是带上物体本身长度的!) HorizontalFit 即 Conte 阅读全文
posted @ 2017-09-25 17:58 叫我张先生 阅读(2660) 评论(0) 推荐(0) 编辑
摘要: 通过监听UGUI的OnDrag事件 实现对3D物体的旋转 实现IDragHandler接口 刷新3D物体的欧拉角 这样即可实现拖动UI 旋转3D物体 是不是很简单 效果如下 阅读全文
posted @ 2017-09-21 12:01 叫我张先生 阅读(2650) 评论(0) 推荐(0) 编辑