Files
Obsidian_Unity/Unity学习/删除组件和gameobject.md
T

10 lines
396 B
Markdown
Raw Normal View History

2026-05-03 14:06:26 +08:00
//清除
ClearPieceAt(piece);
yield return new WaitForSeconds(0.25f);
//塌陷
movingPieces=CollapseColumn(piece);
三消游戏过程中遇到上述代码,我们在前面通过ClearPieceAt清除了piece列表中每一个piece对应的gameobject.
但是在塌陷代码中依旧使用piece其中的坐标,对塌陷进行处理.
之所以塌陷还可以使用piece,而没有报错的原因是