Example #1
0
 public IEnumerator Pan(CallBackResource callback) {
     while (focusTime > 0.0f) {
         focusTime -= Time.deltaTime;
         m_Camera.transform.position = Vector3.Lerp(startPos, endPos, (tspan - focusTime) / tspan);
         yield return new WaitForEndOfFrame();
     }
     callback();
 }
Example #2
0
 public void nextLevel() {
     if (lData.Length == currentLevel + 1) {
         Debug.Log("You Won!");
         // TODO:Celebrate
     }
     else {
         currentLevel++;
         m_CamAnimator.panToFocii(currentLevel, lData[currentLevel].PanTime);
         callbackFct = SetupResource;
         StartCoroutine(m_CamAnimator.Pan(callbackFct));
     }
 }