Esempio n. 1
0
        /// <summary>
        /// Instantiate and attach the sprite overlays if they don't exist
        /// </summary>
        private void AddOverlayGameObjects()
        {
            if (engulfedBurningOverlay == null)
            {
                engulfedBurningOverlay =
                    Instantiate(engulfedBurningPrefab, OverlaySprites.transform).GetComponent <PlayerDirectionalOverlay>();
                engulfedBurningOverlay.enabled = true;
                engulfedBurningOverlay.StopOverlay();
            }

            if (partialBurningOverlay == null)
            {
                partialBurningOverlay =
                    Instantiate(partialBurningPrefab, OverlaySprites.transform).GetComponent <PlayerDirectionalOverlay>();
                partialBurningOverlay.enabled = true;
                partialBurningOverlay.StopOverlay();
            }

            if (electrocutedOverlay == null)
            {
                electrocutedOverlay         = Instantiate(electrocutedPrefab, OverlaySprites.transform).GetComponent <PlayerDirectionalOverlay>();
                electrocutedOverlay.enabled = true;
                electrocutedOverlay.StopOverlay();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Instantiate and attach the sprite overlays if they don't exist
 /// </summary>
 private void AddOverlayGameObjects()
 {
     if (burningOverlay == null)
     {
         burningOverlay         = Instantiate(burningPrefab, transform).GetComponent <PlayerDirectionalOverlay>();
         burningOverlay.enabled = true;
         burningOverlay.StopOverlay();
     }
     if (electrocutedOverlay == null)
     {
         electrocutedOverlay         = Instantiate(electrocutedPrefab, transform).GetComponent <PlayerDirectionalOverlay>();
         electrocutedOverlay.enabled = true;
         electrocutedOverlay.StopOverlay();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Instantiate and attach the sprite overlays if they don't exist
 /// </summary>
 private void AddOverlayGameObjects()
 {
     if (engulfedBurningOverlay == null)
     {
         engulfedBurningOverlay         = Instantiate(ENGULFED_BURNING_OVERLAY_PREFAB, transform).GetComponent <PlayerDirectionalOverlay>();
         engulfedBurningOverlay.enabled = true;
         engulfedBurningOverlay.StopOverlay();
     }
     if (partialBurningOverlay == null)
     {
         partialBurningOverlay         = Instantiate(PARTIAL_BURNING_OVERLAY_PREFAB, transform).GetComponent <PlayerDirectionalOverlay>();
         partialBurningOverlay.enabled = true;
         partialBurningOverlay.StopOverlay();
     }
     if (electrocutedOverlay == null)
     {
         electrocutedOverlay         = Instantiate(ELECTROCUTED_OVERLAY_PREFAB, transform).GetComponent <PlayerDirectionalOverlay>();
         electrocutedOverlay.enabled = true;
         electrocutedOverlay.StopOverlay();
     }
 }