/// <summary> /// 分配一个对象 /// </summary> /// <param name="value">初始值</param> /// <returns></returns> public static VarVector2 Alloc(Vector2 value) { VarVector2 var = Alloc(); var.Value = value; return(var); }
/// <summary> /// 分配一个对象 /// </summary> /// <returns></returns> public static VarVector2 Alloc() { VarVector2 var = GameEntry.Pool.DequeueVarObject <VarVector2>(); var.Value = Vector2.zero; var.Retain(); return(var); }