public void DistractionTileTouched(Ball player) { players.Add(player); switch (distractionCase) { case BLINKING_START: { if (multipleActivationsPossible || !touchedBefore) { thisHexagon.GetAudioSource().Play(); touchedBefore = true; blinking = true; if (onlyThisPlatformIsBlinking) { StartCoroutine(StartBlinking(platformTiles)); } else { StartCoroutine(StartBlinking(allTiles)); } } break; } case BLINKING_STOP: { StopBlinking(); if (setColorBackImmediately) { SetColorBackImmediately(); } break; } case SCROLLING_TEXT_START: { if (!touchedBefore) { GameObject scrollingText = Instantiate(_scrollingText); thisHexagon.GetAudioSource().Play(); var Distraction = new GameObject(); Distraction.name = "Player" + (player.GetPlayerNumber() + 1); Distraction.transform.parent = GameObject.Find("/Map/Distractions").transform; scrollingText.transform.SetParent(Distraction.transform); player.SetDistractionOnCanvas(scrollingText); touchedBefore = true; } break; } case SCROLLING_TEXT_STOP: { string distractionFolder = "/Map/Distractions/Player" + (player.GetPlayerNumber() + 1); GameObject scrollingText = GameObject.Find(distractionFolder); Destroy(scrollingText); player.RemoveDistractionOnCanvas(); break; } case LOSE_CONTROL: { player.DeactivatePlayerControls(); break; } case REGAIN_CONTROL: { player.ActivatePlayerControls(); break; } } }