/// <summary> /// 分配一个对象 /// </summary> /// <param name="value"></param> /// <returns></returns> public static VarBool Alloc(bool value) { //要从对象池获取 VarBool var = Alloc(); var.Value = value; return(var); }
public static VarBool Alloc() { //要从对象池获取 VarBool var = GameEntry.Pool.DequeueVarObject <VarBool>(); var.Value = default(bool); var.Retain(); return(var); }