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