Esempio n. 1
0
 public static LTDescr SetCallEventOnStart(this LTDescr animation, GameEvent gameEvent, bool allowDuplicates = true)
 {
     return(animation.addOnStart(() =>
     {
         EventSystem.Singleton.PublishEvent(gameEvent, allowDuplicates);
     }));
 }
Esempio n. 2
0
    public LTDescr UIMoveRelative(RectTransform rectTransform, Vector3 to, float time)
    {
        LTDescr leanTweenValue = LeanTween.value(0, 1, time);

        leanTweenValue.addOnStart(() =>
        {
            StartCoroutine(UIMoveRelativeCoroutine(leanTweenValue, rectTransform, to, time));
        });
        return(leanTweenValue);
    }
Esempio n. 3
0
    public LTDescr UIShake(RectTransform rectTransform, float magnitude, float rateOfChange, float time, float frequency = 10)
    {
        LTDescr leanTweenValue = LeanTween.value(0, frequency * time, time);

        leanTweenValue.addOnStart(() =>
        {
            StartCoroutine(UIShakeCoroutine(leanTweenValue, rectTransform, magnitude, rateOfChange, time));
        });
        return(leanTweenValue);
    }
Esempio n. 4
0
    public LTDescr OrbitAroundPoint(RectTransform rectTransform, Vector3 center, float radians, float time, float?startingRadians)
    {
        LTDescr leanTweenValue = LeanTween.value(0, 1, time);

        leanTweenValue.addOnStart(() =>
        {
            StartCoroutine(OrbitCoroutine(leanTweenValue, rectTransform, center, radians, time, startingRadians));
        });

        return(leanTweenValue);
    }