public class xxxxennum : MonoBehaviour {
public enum PlayerType{
Soldier,Nurse,BlackSmith
}
public PlayerType playerType;
// Use this for initialization
void Start () {
SayHello();
}
voi...
分类:
编程语言 时间:
2015-02-26 16:37:48
阅读次数:
161
jQuery mobile 学习02 页面事件...
分类:
Web程序 时间:
2015-02-26 14:57:42
阅读次数:
175
1、设置字数限制,超出部分用省略号代替
添加UILabel的NGUI控件,给控件绑定脚本,如下:
using UnityEngine;
using System.Collections;
public class LabelScript : MonoBehaviour {
private UILabel label;
// Use this for initialization
voi...
分类:
编程语言 时间:
2015-02-26 13:31:46
阅读次数:
497
AsyncOperation mAsync; //需要加载的场景 public UISlider LoadingSlider; //NGUI做的 public UILabel GameTip; // Use this for initialization void OnEnable() { ...
分类:
其他好文 时间:
2015-02-20 01:28:41
阅读次数:
350
vmlite虚拟机启动出错,就把这个虚拟机删除掉重新建立,系统虚拟硬盘使用之前的,启动系统后不能上网,通过ifconfig查看网卡没启动,遂启动网卡服务,但是出错,就是:device eth0 does not seem to be present, delaying initialization,...
分类:
其他好文 时间:
2015-02-13 09:41:51
阅读次数:
171
delphi xe7 中对数组操作做了很多扩充,比如加入了类似字符串处理的功能。例如,数组相加var A: array of integer; B: TBytes = [1,2,3,4]; //Initialization can be done from declarationbegin ....
分类:
编程语言 时间:
2015-02-10 13:15:23
阅读次数:
173
转:http://hukai.me/java-notes-singleton-pattern/这里不赘述单例模式的概念了,直接演示几种不同的实现方式。0)Eager initialization如果程序一开始就需要某个单例,并且创建这个单例并不那么费时,我们可以考虑用这种方式:123456789pu...
分类:
编程语言 时间:
2015-02-08 18:05:17
阅读次数:
187
为防止资源泄漏,请使用RAII(Resource Acquisiton Is Initialization) 对象,它们在构造函数中获得资源并在析构函数中释放资源。两个常被使用的RAII classes 分别是tr1::shared_ptr和auto_ptr。前者通常是较佳选择,因为其copy行为比...
分类:
编程语言 时间:
2015-01-30 22:23:54
阅读次数:
171
在搭建LVS+Keepalived高可用负载均衡环境的过程中,使用VirtualBox复制了两个Centos的环境,并且选中了“重新初始化网卡”的选项,但是在启动这两个复制的Centos环境的时候,发现网卡eth0没有启动,执行:service network restart 命令,报错:devic...
分类:
其他好文 时间:
2015-01-30 15:16:37
阅读次数:
225
0)Eager initialization如果程序一开始就需要某个单例,并且创建这个单例并不那么费时,我们可以考虑用这种方式:123456789public class Singleton { private static final Singleton INSTANCE = new Sin...
分类:
其他好文 时间:
2015-01-30 15:09:08
阅读次数:
166