Esempio n. 1
0
 public void UpdateCutscene(float deltaTime)
 {
     if (deltaTime > 0)
     {
         frame++;
     }
     else if (deltaTime < 0)
     {
         frame--;
     }
     RunningTime += deltaTime * playbackSpeed;
     TrackGroup[] groups = GetTrackGroups();
     for (int i = 0; i < groups.Length; i++)
     {
         TrackGroup group = groups[i];
         group.UpdateTrackGroup(RunningTime, deltaTime * playbackSpeed);
     }
     DoSomethingWhilePlaying(RunningTime);
     if (state != CutsceneState.Scrubbing)
     {
         if (runningTime >= duration || runningTime < 0f)
         {
             Stop();
         }
     }
 }
Esempio n. 2
0
 static public int UpdateTrackGroup(IntPtr l)
 {
     try {
         CinemaDirector.TrackGroup self = (CinemaDirector.TrackGroup)checkSelf(l);
         System.Single             a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         self.UpdateTrackGroup(a1, a2);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Updates the cutscene by the amount of time passed.
        /// </summary>
        /// <param name="deltaTime">The delta in time between the last update call and this one.</param>
        public void UpdateCutscene(float deltaTime)
        {
            this.RunningTime += (deltaTime * playbackSpeed);

            TrackGroup[] groupArr = this.GetTrackGroups();
            for (int i = 0; i < groupArr.Length; i++)
            {
                TrackGroup group = groupArr[i];
                group.UpdateTrackGroup(RunningTime, deltaTime * playbackSpeed);
            }
            if (state != CutsceneState.Scrubbing)
            {
                if (runningTime >= duration || runningTime < 0f)
                {
                    Stop();
                }
            }
        }