上一页 1 2 3 4 5 6 7 8 9 10 ··· 43 下一页
摘要: 截取操作,可用于浮点数。 阅读全文
posted @ 2016-08-07 11:44 yufenghou 阅读(1134) 评论(0) 推荐(0)
摘要: 网格渲染器,其中unity里面多有的材质在渲染的时候都是会划分成三角形的,所以当添加一些物体的时候,例如3d text的时候,默认添加网格渲染器。 最常用的就是获取材质。 下面是一个利用网格渲染器获得材质,设置不透明度的例子。 阅读全文
posted @ 2016-08-07 11:38 yufenghou 阅读(5980) 评论(0) 推荐(0)
摘要: ``` using UnityEngine; using System.Collections; using System; public class LearnGrazio : MonoBehaviour { public Transform m_Transform; public float m 阅读全文
posted @ 2016-08-07 11:20 yufenghou 阅读(1181) 评论(0) 推荐(0)
摘要: 创建一个AudioSource组件,拖一个mp3组件到这个组建上 新建一个脚本,拖audiosource到audiosource的声明上 阅读全文
posted @ 2016-08-07 11:19 yufenghou 阅读(224) 评论(0) 推荐(0)
摘要: cc.Class({ extends: cc.Component, properties: { isAPress:false, aLabel: { default:null, type :cc.Label } }, // use this for initialization onLoad: fun 阅读全文
posted @ 2016-06-25 22:01 yufenghou 阅读(126) 评论(0) 推荐(0)
摘要: 研究了一天,多点触控的点无法保存,只能模拟多点触控了 阅读全文
posted @ 2016-06-25 19:10 yufenghou 阅读(214) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { }, // use this for initialization onLoad: function () { this.registerTouch() }, registerTouch:function () { ... 阅读全文
posted @ 2016-06-24 23:40 yufenghou 阅读(143) 评论(0) 推荐(0)
摘要: ``` 当修改完一个函数,但是不知道哪个函数调用的时候没有传递正确的参数的时候 需要找出调用这个函数的所有语句,于是我注释掉这个函数就可以了 ``` 阅读全文
posted @ 2016-06-24 22:19 yufenghou 阅读(128) 评论(0) 推荐(0)
摘要: ``` module.exports.assert = function (express,value,msg) { if(express==value) { cc.info("test:"+msg) } else { cc.warn("test:"+msg+" error") } }; ``` 阅读全文
posted @ 2016-06-23 14:36 yufenghou 阅读(104) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { progressBar: { default:null, type:cc.ProgressBar }, }, // use this for initialization ... 阅读全文
posted @ 2016-06-23 14:12 yufenghou 阅读(187) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 43 下一页