上一页 1 2 3 4 5 6 ··· 15 下一页
2016年2月4日

u3d shader使用

摘要: 先建立一个材质球Material 选择shader 把材质球Material 赋给图片 阅读全文
posted @ 2016-02-04 15:26 602147629 阅读(343) 评论(0) 推荐(0) 编辑

lua实现多继承

摘要: http://my.oschina.net/u/156466/blog/401576local class1 = {} function class1:new() local obj = {} setmetatable(obj, {__index= class1}) return obj end f 阅读全文
posted @ 2016-02-04 11:48 602147629 阅读(987) 评论(0) 推荐(0) 编辑

lua 类实现

摘要: Class={}; Class.classList={}; --保存所有已经定义过的类 --类的类型: 类和接口, 接口也是一种类 Class.TYPE_CLASS="Class"; Class.TYPE_INTERFACE="Interface"; function Class.isExist(c 阅读全文
posted @ 2016-02-04 11:29 602147629 阅读(2944) 评论(0) 推荐(0) 编辑

lua 类继承和实现

摘要: http://blog.csdn.net/ssihc0/article/details/7742323 Account={balance=0}; --新建了一个对像,他有一个属性balance function Account:new(o) --这里的 :new(o) 中的冒号,代码可以省略self 阅读全文
posted @ 2016-02-04 11:16 602147629 阅读(446) 评论(0) 推荐(0) 编辑

Lua多重继承

摘要: http://blog.csdn.net/ssihc0/article/details/7742421 代码收藏了,以后用的到 --多重继承 local function search(k,plist) for i=1,#plist do local v=plist[i][k] -- 取一个基类 i 阅读全文
posted @ 2016-02-04 11:15 602147629 阅读(258) 评论(0) 推荐(0) 编辑
2015年11月23日

与或运算

摘要: //"arr":[1,2,3,4,5]function getBuyGate(arr:Array):int{ var gateArr:Array = [1,2,4,8,16]; var gate:int = 0; for(var i:int=0;i<arr.length;i++) { gate |... 阅读全文
posted @ 2015-11-23 15:45 602147629 阅读(272) 评论(0) 推荐(0) 编辑
2015年11月18日

批量修改名字

摘要: using UnityEditor;using System.IO;using UnityEngine;public class SC{ [MenuItem("Assets/批量修改名字")] public static void PlacePrfab() { Object[] slecets ... 阅读全文
posted @ 2015-11-18 13:57 602147629 阅读(177) 评论(0) 推荐(0) 编辑
2015年10月21日

不足9位数 补0

摘要: var id:String = "000000000" + msg.params[1]; var str:String = id.substr(-9, 9); 阅读全文
posted @ 2015-10-21 18:42 602147629 阅读(334) 评论(0) 推荐(0) 编辑
2015年10月13日

C#中如何只保留小数点后面两位?

摘要: string.format("%.4f",1/3)1、Math.Round(0.333333,2);//按照四舍五入的国际标准2、 double dbdata=0.335333; string str1=String.Format("{0:F}",dbdata);//默认为保留两位3、 ... 阅读全文
posted @ 2015-10-13 19:56 602147629 阅读(11286) 评论(0) 推荐(0) 编辑
2015年9月28日

Int16 Int32 Int64

摘要: 数据类型占多大空间Int16, 等于short, 占2个字节. -32768 32767Int32, 等于int, 占4个字节. -2147483648 2147483647Int64, 等于long, 占8个字节. -9223372036854775808 9223372036854775807一... 阅读全文
posted @ 2015-09-28 16:07 602147629 阅读(319) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 15 下一页