public void Reset() { livingLetter = null; var lingeringLetter = GetComponentInChildren <MakeFriendsLivingLetter>(); if (lingeringLetter != null) { Destroy(lingeringLetter.gameObject); } movingAwayCounter = 1; }
public void SpawnLivingLetter(LL_WordData wordData) { AdjustForDifficulty(); var instance = Instantiate(livingLetterPrefab, offscreenPosition, Quaternion.Euler(entranceRotation), this.transform) as GameObject; instance.SetActive(true); livingLetter = instance.GetComponent <MakeFriendsLivingLetter>(); livingLetter.Init(wordData); livingLetter.container = this.gameObject; livingLetter.focusOnTouch = MakeFriendsGame.Instance.Configuration.Variation == MakeFriendsVariation.HARD ? false : true; AdjustForDifficulty(); }