在bowling游戏里,由于ScoreDisplay中arraylist out of range的错误,使得HandleBowl执行失败,又使得CheckResult执行失败因为CheckResult使用了HandleBowl,最后每个Update都失败因为CheckResult每帧都被call,错误原始结果像这样:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[System.Int32].CheckIndex (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:419)
System.Collections.Generic.List`1[System.Int32].set_Item (Int32 index, Int32 value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:637)
ScoreDisplay.FillRollCard (System.Collections.Generic.List`1 rolls) (at Assets/Script/ScoreDisplay.cs:24)
GameManager.HandleBowl (Int32 pins) (at Assets/Script/GameManager.cs:37)
LaneCheckBox.CheckAndManagerResult () (at Assets/Script/LaneCheckBox.cs