private void CreateBox(Pos[] pts) { var pos = RandomTools.RandomElement(pts); var num = RandomTools.RandomElement(gameConfig.NumberRange); var box = new NumberBox(pos.X, pos.Y, num); var newViewBox = Instantiate(boxPrefab).GetComponent <NumberController>(); newViewBox.SetPos(pos.X, pos.Y).SetNumberText(num); boxes = box.Cons(boxes).ToArray(); viewBoxes = newViewBox.Cons(viewBoxes).ToArray(); PlusScore(box); SetProgressActive(true); ResetTimer(); }