コード例 #1
0
        /// <summary>
        /// 分配一个对象
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static VarGameObject Alloc(GameObject value)
        {
            //要从对象池获取
            VarGameObject var = Alloc();

            var.Value = value;
            return(var);
        }
コード例 #2
0
        public static VarGameObject Alloc()
        {
            //要从对象池获取
            VarGameObject var = GameEntry.Pool.DequeueVarObject <VarGameObject>();

            var.Value = default(GameObject);
            var.Retain();
            return(var);
        }