void OnEnable() { GamePlay.OnScoreUpdatedEvent += OnScoreUpdated; if (PlayerPrefs.GetInt("isRescued", 0) == 1) { rotateSpeed = ((rotateSpeed > minSpeed) ? rotateSpeed : minSpeed); if (currentRing == null) { currentRing = Rings [Random.Range(0, Rings.Count)]; } } else { currentRing = Rings [Random.Range(0, Rings.Count)]; rotateSpeed = minSpeed; } currentRing.SetActive(true); EGTween.Init(gameObject); StartRotation(); }
/// <summary> /// Raises the enable event. /// </summary> void OnEnable() { EGTween.Init(gameObject); StartRotation(); }
public static void Init(this GameObject target) { EGTween.Init(target); }