Ejemplo n.º 1
0
    public IEnumerator PlayTakeOverAnimations()
    {
        foreach (KeyValuePair <ScoreTracker, PointsGiver> entry in takeOvers)
        {
            ScoreTracker tracker     = entry.Key;
            PointsGiver  pointsGiver = entry.Value;
            yield return(StartCoroutine(MoveCameraToPosition(tracker.GetComponent <TileVisitor> ().CurrentlyVisiting.transform.position)));

            yield return(StartCoroutine(ZoomCamera(highlightZoomWidth)));

            tracker.GetComponent <CharacterAnimationController>().ApplyState(StateType.Sticker,
                                                                             pointsGiver.GetComponent <HumanAnimationController>());
            GetComponent <AudioSource> ().PlayOneShot(stickerNoise);
            yield return(new WaitForSeconds(timePerStickerAnim));

            yield return(StartCoroutine(ZoomCamera(defaultCameraWidth)));
        }
        yield return(StartCoroutine(MoveCameraToPosition(defaultCameraPos)));

        takeOvers.Clear();
        objectsToAnimate.Clear();
    }