예제 #1
0
 private void UpdateActiveBeatBlockPreHit(float trackTime)
 {
     // This should only be called when we are an active BeatBlock, and we have not yet triggered as 'hit'
     AnimationGameObjectController.Update(AnimationCurve.MapTimeToAnimationPercentage(GetLifeTimeRatio(trackTime)));
     if (trackTime >= HitTime)
     {
         HitboxGameObjectController.StartAnimation(this.GridPosition, this.SizeScalingFactor, this.HitboxPlaybackSpeedScale);
         currTimerObject.UpdateTime -= UpdateActiveBeatBlockPreHit;
         currTimerObject.UpdateTime += UpdateActiveBeatBlockPostHit;
     }
 }
예제 #2
0
 /// <summary>
 /// Called by the Game manager when it is time for this BeatBlock to start. I.e. the game time is (HitTime - Speed)
 /// All we need to do here is register for updates from the game timer source, and trigger the animation object to start it's animation!
 /// </summary>
 /// <param name="timerObject"></param>
 /// <returns></returns>
 public bool ActivateBeatBlock(IMasterGameTimer timerObject)
 {
     timerObject.UpdateTime += UpdateActiveBeatBlockPreHit;
     currTimerObject         = timerObject;
     return(AnimationGameObjectController.StartAnimation(this.GridPosition, this.SizeScalingFactor, this.Speed, this.ComboFactor));
 }