暗黑斩Demo里对象池部分是不是有个BUG啊?

在PoolMng脚本里
returnFoe (foeType, obj) { let thePool = this.foePools[foeType]; if (thePool.idx < thePool.size) { thePool.return(obj); } else { cc.log('Return obj to a full pool, something has gone wrong'); return; } },
这里if (thePool.idx < thePool.size) 应该是if (thePool.idx +1< thePool.size) 吧。因为在NodePool脚本里有
return ( obj ) { ++this.idx; obj.active = false; if (obj.parent) { obj.removeFromParent(); } this.list[this.idx] = obj; }
这里是++this.idx 之后this.list[this.idx] = obj,添加的obj是放在this.idx+1位置的。this.idx不超出数组大小就行了。
不知道是我想错了,还是Demo里的一个Bug