Exemplo n.º 1
0
 public void e_GrowRadio()
 {
     foreach (Transform child in radioWaveParent.transform)
     {
         child.gameObject.GetComponent <SpriteRenderer>().color = new Color(255f, 255f, 255f, 255f);
     }
     animBasic.Animate(AnimationTweenType.Scale, Vector2.zero, Vector2.zero);
 }
Exemplo n.º 2
0
    private IEnumerator AnimateRace()
    {
        Animate_Basic bushAnimator = GetComponent <Animate_Basic>();
        Tween         tempTweener;

        isAnimating = true;

        tempTweener = bushAnimator.Animate(AnimationTweenType.Move, bushStart.transform.position, Vector2.zero);
        yield return(new WaitForSeconds(tempTweener.Duration()));

        tempTweener = bushAnimator.Animate(AnimationTweenType.Scale, Vector2.zero, Vector2.zero);
        //tempTweener = bushAnimator.Animate(AnimationTweenType.RotateZ, Vector2.zero, Vector2.zero);

        yield return(new WaitForSeconds(tempTweener.Duration()));

        isAnimating = false;
        // Raise event or something
    }
Exemplo n.º 3
0
    private IEnumerator pullBack()
    {
        audioSource.clip = pullBackSFX;
        audioSource.Play();
        isAnimating = true;
        Tween tweener = animBasic.Animate(AnimationTweenType.RotateZ, Vector2.zero, Vector2.zero);

        animBasicPistonA.Animate(AnimationTweenType.Move, pistonOutPoint.transform.position, pistonInPoint.transform.position);
        yield return(new WaitForSeconds(tweener.Duration() / 2));

        outCollider.enabled = false;
        inCollider.enabled  = true;
        yield return(new WaitForSeconds(tweener.Duration() / 4));

        light.SetActive(true);
        yield return(new WaitForSeconds(tweener.Duration() / 4));

        isAnimating = false;
        isPrimed    = true;
    }
Exemplo n.º 4
0
 private IEnumerator dropAlien(bool isOffScreen)
 {
     isDropping = true;
     if (!isOffScreen)
     {
         rb.drag = 40;
         Tweener tweener = animBasic.Animate(AnimationTweenType.Scale, Vector2.zero, Vector2.zero);
         yield return(new WaitForSeconds(tweener.Duration() / 3));
     }
     alienDropped.Raise();
     Destroy(gameObject);
 }
Exemplo n.º 5
0
    private IEnumerator pushForward()
    {
        audioSource.clip = pushForwardSFX;
        audioSource.Play();
        isAnimating = true;
        Tween tweener = animBasic.Animate(AnimationTweenType.RotateZ2, Vector2.zero, Vector2.zero);

        animBasicPistonB.Animate(AnimationTweenType.EndMove, pistonInPoint.transform.position, pistonOutPoint.transform.position);
        yield return(new WaitForSeconds(tweener.Duration() * 0.1f));

        light.SetActive(false);
        crusherCrushLogic.GetComponent <CrusherCrush>().CrushAlien();
        // PARTICLES HERE
        outCollider.enabled = false;
        inCollider.enabled  = true;

        yield return(new WaitForSeconds(tweener.Duration() * 0.9f));

        isAnimating = false;
        isPrimed    = false;
    }