void stepAnimation(AffectedQuad aq)
    {
        if (aq.idleTime > 0) {
            aq.idleTime -= Time.deltaTime;
            return;
        }

        aq.animTime += Time.deltaTime;
        if (aq.animTime >= animationLength)
        {
            resetAnimation(aq);
        }
    }
    void stepAnimation(AffectedQuad aq)
    {
        if (aq.idleTime > 0)
        {
            aq.idleTime -= Time.deltaTime;
            return;
        }

        aq.animTime += Time.deltaTime;
        if (aq.animTime >= animationLength)
        {
            resetAnimation(aq);
        }
    }
 void calcAffectedQuads()
 {
     affectedQuads = new List<AffectedQuad> ();
     /* Add every quad that is inside the sphere to its list of affected quads */
     foreach (Transform narrativeScenario in photoParent.transform) {
         foreach (Transform episode in narrativeScenario) {
             foreach (Transform photo in episode) {
                 if (Vector3.Distance(photo.position, collider.transform.position) < collider.radius)
                 {
                     //Debug.Log ("adding affected quad");
                     AffectedQuad aq = new AffectedQuad();
                     aq.quad = photo.gameObject;
                     resetAnimation(aq);
                     affectedQuads.Add(aq);
                 }
             }
         }
     }
 }
 void calcAffectedQuads()
 {
     affectedQuads = new List <AffectedQuad> ();
     /* Add every quad that is inside the sphere to its list of affected quads */
     foreach (Transform narrativeScenario in photoParent.transform)
     {
         foreach (Transform episode in narrativeScenario)
         {
             foreach (Transform photo in episode)
             {
                 if (Vector3.Distance(photo.position, collider.transform.position) < collider.radius)
                 {
                     //Debug.Log ("adding affected quad");
                     AffectedQuad aq = new AffectedQuad();
                     aq.quad = photo.gameObject;
                     resetAnimation(aq);
                     affectedQuads.Add(aq);
                 }
             }
         }
     }
 }
 void resetAnimation(AffectedQuad aq)
 {
     aq.idleTime = Random.Range(animationIdleMin, animationIdleMax);
     aq.animTime = 0.0f;
 }
 void resetAnimation(AffectedQuad aq)
 {
     aq.idleTime = Random.Range(animationIdleMin, animationIdleMax);
     aq.animTime = 0.0f;
 }