Ejemplo n.º 1
0
    void Rotate()
    {
        audioSource.Play();
        float startRotationZ = transform.rotation.eulerAngles.z;

        StartCoroutine(IEnumeratorMethods.Lerp(startRotationZ, startRotationZ + angleMove, audioSource.clip.length, AssignRotation));
    }
    IEnumerator SmoothMovement()
    {
        Vector3 origin = transform.position;

        while (true)
        {
            yield return(StartCoroutine(IEnumeratorMethods.Lerp(origin, destiny.position, duration, AssignPosition)));

            yield return(StartCoroutine(IEnumeratorMethods.Lerp(destiny.position, origin, duration, AssignPosition)));
        }
    }
Ejemplo n.º 3
0
    void PlayScoreCounter(float score, Action <float> txtToDispaly)
    {
        Func <IEnumerator> scoreCounterDuration = () => IEnumeratorMethods.Lerp(0, score, scoreCounterSnd.clip.length, txtToDispaly);

        StartCoroutine(scoreCounterDuration());
    }
Ejemplo n.º 4
0
 // TODO: new class
 void EffectOfDealingCards()
 {
     _decks[ageNr]._slots.ForEach(s =>
                                  StartCoroutine(
                                      IEnumeratorMethods.Lerp(new Vector3(0, 0.3f, 0), s.transform.position, 1.1f, t => s.transform.position = t)));
 }