// Start is called before the first frame update void Start() { playerMoveInFixPos = () => { if (currentMiniGameInPlay) { currentMiniGameInPlay.EndMiniGame(); } }; if (!buttonInstance) { buttonInstance = (GameObject)Instantiate(PatternButton, PatternButtonPos.position, Quaternion.identity); } PatternButtonAnim = buttonInstance.GetComponent <Animator>(); buttonInstance.SetActive(false); if (_brokenMiniGame.CanBeBroke) { StartCoroutine(nameof(broke)); } }