Exemple #1
0
 private void UpdateActiveBeatBlockPostHit(float trackTime)
 {
     // This should only be called when we are an active BeatBlock, and we have already triggered as 'hit'
     HitboxGameObjectController.Update(trackTime - HitTime);
     if (trackTime >= HitTime + HitboxGameObjectController.HitDelayOffset + HitboxGameObjectController.HitboxDuration)
     {
         // Deregister for timer updates, and tell the master timer we have finished, and can once again become inactive
         currTimerObject.UpdateTime -= UpdateActiveBeatBlockPostHit;
         currTimerObject.SignalCompletion(this);
         currTimerObject = null;
         OnLayoutTrack   = false;
     }
 }
Exemple #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));
 }