private void CreateNewBall() { GameObject newBall = Instantiate(ballPrefab, levelSpawningPosition, new Quaternion()); newBall.GetComponent <BallScript>().SetBallObject(ApplicationData.RandomNewColorForBoard(), (balls.starting? spawningBallSpeedLevelOnStart:spawningBallSpeedLevelNormal)); newBall.name = "Ball" + ApplicationData.GetBallIndex().ToString(); newBall.tag = "Ball"; balls.AppendLast(newBall); ballsCount++; if (ballCreated != null) { ballCreated(newBall); } if (ballsCount == 1) { if (deleteSequence != null) { deleteSequence(GetAllColorsOnBoard()); } } }