void CreateGhosts() { var ghostPlaceList = CurrentStage.GetGhostStartPlace(); for (int i = 0; i < ghostPlaceList.Count; i++) { Ghost ghost; switch (i % 4) { case 1: ghost = Instantiate(prefPinky).GetComponent <Pinky>(); break; case 2: ghost = Instantiate(prefInky).GetComponent <Inky>(); break; case 3: ghost = Instantiate(prefClyde).GetComponent <Clyde>(); break; default: ghost = Instantiate(prefBlinky).GetComponent <Blinky>(); break; } ghost.Init(ghostPlaceList[i], CurrentStage.Min, CurrentStage.Max); GhostList.Add(ghost); } }