示例#1
0
    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();
    }
示例#2
0
 /// <summary>
 /// Raises the enable event.
 /// </summary>
 void OnEnable()
 {
     EGTween.Init(gameObject);
     StartRotation();
 }
示例#3
0
 public static void Init(this GameObject target)
 {
     EGTween.Init(target);
 }