摘要: private int _shoutNum=3; public int ShoutNum{ get{ return _shoutNum; } set{ _shoutNum=value; } } private int _shoutNum=3; public int ShoutNum{ get{ return _shoutNum; } //没有set就是说明只读,不可以编写 } private int _shoutNum=3; public int ShoutNum{ get{ return _shoutNum; } set{ if(_shoutNum... 阅读全文
posted @ 2014-02-18 22:16 古刹红罗 阅读(96) 评论(0) 推荐(0)
摘要: MyObject 是unity场景中物体的名称MyFunction 是Js代码中的函数名称aa是属性 阅读全文
posted @ 2014-02-18 14:52 古刹红罗 阅读(157) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;public class NewBehaviourScript : MonoBehaviour {void OnGUI(){if(GUI.Button(new Rect(10,10,100,30),"点击")){Application.ExternalCall ("MyFunction2", "Hello from Unity!");//web窗体显示Hello from Unity}}}保存 发布成webplay形式在html中Unity Web 阅读全文
posted @ 2014-02-11 14:41 古刹红罗 阅读(198) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;public class Animation : MonoBehaviour { private Animator _animator; [SerializeField] private Vector2[] _Postion; [SerializeField] private float _framePerSecond;//帧速率 [SerializeField] int _index = 0; // Use this for initialization ... 阅读全文
posted @ 2013-12-31 12:01 古刹红罗 阅读(142) 评论(0) 推荐(0)
摘要: --金属Metal --玻璃Glass --镜子Mirror --家具Paint--布料Clothglobal _bool_A=falseglobal _bool_B=falseglobal _bool_C=falseglobal _bool_D=falseglobal _bool_E=falseglobal _bool_F=falserollout SongYangTool "虚拟现实工具 v1.8 享视文化传播" width:300 height:150( button btn1 "执行代码" pos:[205,110] width:80 heigh 阅读全文
posted @ 2013-12-20 09:19 古刹红罗 阅读(436) 评论(0) 推荐(0)
摘要: public void PlayCurrAudio() { Animator anim = AnimationManager._This.GetAnimator("body"); AnimatorStateInfo info = anim.GetCurrentAnimatorStateInfo(0); for (int i = 0; i < audios.Count; i++) { if (info.IsName(audios[i].name)) { Debug.L... 阅读全文
posted @ 2013-12-19 09:04 古刹红罗 阅读(220) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;using System;public class TimeManager{ //和服务器时间错的差距 static int gapTimeWithServer; //获得秒级单位的时间戳 public static int GetEpoch() { TimeSpan t = ( DateTime.UtcNow - new DateTime( 1970, 1, 1 ) ); int timestamp = (int)t.TotalSeconds; ... 阅读全文
posted @ 2013-12-18 16:34 古刹红罗 阅读(193) 评论(0) 推荐(0)
摘要: 作用:降低各模块之间的耦合,为系统提供更好的可扩展性和可维护性。特点:1、接口只能继承接口,不能继承类。2、接口是规范,不包含构造器和初始化定义。3、接口中包含的方法只能是抽象方法。4、接口中的内部类,枚举类,接口默认的使用public static 修饰。5、接口中的Field用 public static final修饰。6、接口中的方法用 public abstract修饰。7、接口支持多继承。8、接口不能用于创建实例,但接口可以用于声明引用类型变量。9、类实现接口时,必须将接口里的抽象类全部实现。--------------------------------------------- 阅读全文
posted @ 2013-12-18 12:00 古刹红罗 阅读(233) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;public class FaceTouch : MonoBehaviour { float _time = 0f; int _num = 0; bool _isplay; // Use this for initialization void OnEnable() { EasyTouch.On_SimpleTap += On_SimpleTap; EasyTouch.On_TouchUp += On_TouchUp; EasyTo... 阅读全文
posted @ 2013-12-14 18:06 古刹红罗 阅读(274) 评论(0) 推荐(0)
摘要: using UnityEngine;using System.Collections;using System.Xml;using System.Xml.Serialization;using System.IO;using System.Text;using System.Collections;public class Load : MonoBehaviour{ WWW _www; public string _prefabName = "XML/Body02.xml"; FileInfo fileInfo; string _data; string _s; ... 阅读全文
posted @ 2013-12-12 15:49 古刹红罗 阅读(700) 评论(0) 推荐(0)