예제 #1
0
 /// <summary>
 /// Toggle the electrocuted overlay for the player's mob. Assumes player mob is humanoid.
 /// </summary>
 public void ToggleElectrocutedOverlay()
 {
     if (electrocutedOverlay.OverlayActive)
     {
         electrocutedOverlay.StopOverlay();
     }
     else
     {
         electrocutedOverlay.StartOverlay(directional.CurrentDirection);
     }
 }
예제 #2
0
        public void SetBurningOverlay()
        {
            if (burningOverlay == null)
            {
                AddOverlayGameObjects();
            }

            burningOverlay.StartOverlay(directional.CurrentDirection);
        }
예제 #3
0
        /// <summary>
        /// Enable the electrocuted overlay for the player's mob.
        /// </summary>
        /// <param name="time">If provided and greater than zero, how long until the electrocuted overlay is disabled.</param>
        public void EnableElectrocutedOverlay(float time = -1)
        {
            if (electrocutedOverlay == null)
            {
                AddOverlayGameObjects();
            }

            if (time > 0)
            {
                StartCoroutine(StopElectrocutedOverlayAfter(time));
            }

            electrocutedOverlay.StartOverlay(rotatable.CurrentDirection);
        }
예제 #4
0
 /// <summary>
 /// Updates whether burning sprites are showing and sets their facing
 /// </summary>
 private void UpdateBurningOverlays(float fireStacks, OrientationEnum currentFacing)
 {
     if (fireStacks <= 0)
     {
         engulfedBurningOverlay.StopOverlay();
         partialBurningOverlay.StopOverlay();
     }
     else if (fireStacks < FIRE_STACK_ENGULF_THRESHOLD)
     {
         partialBurningOverlay.StartOverlay(currentFacing);
         engulfedBurningOverlay.StopOverlay();
     }
     else
     {
         engulfedBurningOverlay.StartOverlay(currentFacing);
         partialBurningOverlay.StopOverlay();
     }
 }