2013年5月22日
摘要: 转:http://lsls0116.blog.163.com/blog/static/3500679120112309226976/<script language="javascript"><!--/*MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.65*\ 制作时间:2006-08-29 (Ver 0.5) 发布时间:2006-08-31 (Ver 0.8) 更新时间:2007-12-28 (Ver 1.65) 更新说明: + 加入功能 * 修正、完善 1.65.071228 * 横向、纵向滚动格 阅读全文
posted @ 2013-05-22 08:47 雨季 阅读(479) 评论(0) 推荐(0) 编辑
  2013年5月2日
摘要: iis6:http://blog.chinaunix.net/uid-20691565-id-3034567.htmliis7:http://www.iisboy.com/iis_article/403.html 阅读全文
posted @ 2013-05-02 13:46 雨季 阅读(347) 评论(0) 推荐(0) 编辑
  2013年3月21日
摘要: 转:http://blog.csdn.net/civerb/article/details/4772007功能/特点:1.实时显示可输入的字数(字节数)2.两种限制方式(长度、字节数)3.中文输入法下可正常使用,无BUG4.同一页面可以使用多个,相互不干扰limit.jsfunction limit(){ var txtNote;//文本框 var txtLimit;//提示字数的input var limitCount;//限制的字数 var isbyte;//是否使用字节长度限制(1汉字=2字符) var txtlength;//到达限制时... 阅读全文
posted @ 2013-03-21 10:43 雨季 阅读(1695) 评论(0) 推荐(0) 编辑
  2012年12月28日
摘要: transform.rotation = Quaternion.Euler(new Vector3(45,a++,0));设置transform的旋转量为绕x轴旋转45度,y轴旋转量累加(y轴这时仍是世界坐标的旋转轴)transform.rotation = Quaternion.Euler(new Vector3(45,0,0)) * Quaternion.Euler(new Vector3(0,a++,0));同样为设置旋转量,但是此句是在x轴旋转45度后再对物体按照其自身的y轴旋转量累加(y轴这时为物体自身的旋转轴)两者效果不一致 阅读全文
posted @ 2012-12-28 10:54 雨季 阅读(1547) 评论(0) 推荐(0) 编辑
  2012年10月9日
摘要: usingUnityEngine;usingSystem.Collections;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem;publicclassComboBox:MonoBehaviour{privateDictionary<object,object>dataSource;privateobjectcurrentValue;privateobjectcurrentDisplayText;privateintcurrentIndex;privateGUISkinskin;privateRectrect 阅读全文
posted @ 2012-10-09 14:29 雨季 阅读(16780) 评论(2) 推荐(0) 编辑
摘要: scrollPosition=Vector2.Lerp(scrollPosition,GUI.BeginScrollView(rectList,scrollPosition,rectListView,false,true),0.5f);BeginScrollView返回值与原始值做差值运算,这里参数为0.5f其实就是取两者的平均数。算个小技巧吧,主要问题还是向量的运算 阅读全文
posted @ 2012-10-09 14:27 雨季 阅读(519) 评论(0) 推荐(0) 编辑
  2012年9月3日
摘要: 1.已知两个向量dirA,dirB。Vector3 dirA = new Vector3(-1,1,0);Vector3 dirB = new Vector3(-1,1,1);2.使向量处于同一个平面,这里平面为XZdirA = dirA - Vector3.Project(dirA,Vecotr3.up);dirB = dirB - Vector3.Project(dirB,Vecotr3.up);注:Vector3.Project计算向量在指定轴上的投影,向量本身减去此投影向量就为在平面上的向量3.计算角度float angle = Vector3.Angle(dirA,dirB);4.计 阅读全文
posted @ 2012-09-03 18:18 雨季 阅读(20258) 评论(0) 推荐(0) 编辑
  2012年7月19日
摘要: voidUpdate(){if(inRotation){Quaternionrotation=Quaternion.LookRotation(target.position-this.transform.position);floatt=Mathf.Min(Time.deltaTime*2,1);rotation=Quaternion.Lerp(transform.rotation,rotation,t);this.transform.rotation=rotation;if(t==1){inRotation=false;}}}voidOnGUI(){if(GUI.Button(newRect 阅读全文
posted @ 2012-07-19 11:10 雨季 阅读(556) 评论(0) 推荐(0) 编辑
  2012年7月17日
摘要: usingUnityEngine;usingSystem.Collections;publicclassPlayerMoveToTarget:MonoBehaviour{publicCharacterController[]players;publicVector3[]targetPosition;privateintrotationSpeed=5;privatefloatspeed=0.05f;publicCameracamera;voidStart(){targetPosition=newVector3[players.Length];for(inti=0;i<players.Len 阅读全文
posted @ 2012-07-17 10:52 雨季 阅读(644) 评论(0) 推荐(0) 编辑
  2012年6月26日
摘要: 下面是摘自网上的一篇教程,写得不错//通过object对象名face得到网格渲染器对象MeshFiltermeshFilter=(MeshFilter)GameObject.Find("face").GetComponent(typeof(MeshFilter));//通过渲染器对象得到网格对象Meshmesh=meshFilter.mesh;//API中写的不是提清楚,我详细的在说一遍//设置顶点,这个属性非常重要//三个点确定一个面,所以Vector3数组的数量一定是3个倍数//遵循顺时针三点确定一面//这里的数量为6也就是我创建了2个三角面//依次填写3D坐标点mes 阅读全文
posted @ 2012-06-26 10:22 雨季 阅读(9006) 评论(0) 推荐(0) 编辑