Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of EnemyHealthBars v1.3.2
NoteBoxz.EnemyHealthBars.dll
Decompiled 11 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EnemyHealthBars.Scripts; using HarmonyLib; using LethalMin; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.AI; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: AssemblyCompany("NoteBoxz.EnemyHealthBars")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.3.2.0")] [assembly: AssemblyInformationalVersion("1.3.2")] [assembly: AssemblyProduct("EnemyHealthBars")] [assembly: AssemblyTitle("NoteBoxz.EnemyHealthBars")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace RockMod.Script { public class LookAtMainCamera : MonoBehaviour { private Camera mainCamera = null; private void Start() { mainCamera = Camera.current; } private void LateUpdate() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (!StartOfRound.Instance.localPlayerController.isPlayerDead) { mainCamera = StartOfRound.Instance.localPlayerController.gameplayCamera; } else { mainCamera = StartOfRound.Instance.spectateCamera; } if ((Object)(object)mainCamera != (Object)null && 2f * ((Component)this).transform.position - ((Component)mainCamera).transform.position != Vector3.zero) { ((Component)this).transform.LookAt(2f * ((Component)this).transform.position - ((Component)mainCamera).transform.position); } } } } namespace EnemyHealthBars { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("NoteBoxz.EnemyHealthBars", "EnemyHealthBars", "1.3.2")] public class EnemyHealthBars : BaseUnityPlugin { public enum HPLayoutEnum { Bar, Circle, Text } public enum VisibiltySettings { AlwaysShow, OnlyShowWhenDamaged } internal static ConfigEntry<float> VisDistance; internal static ConfigEntry<float> VisDuration; internal static ConfigEntry<float> DefultYoffset; internal static ConfigEntry<float> HPScale; internal static ConfigEntry<string> OverrideOffset; internal static ConfigEntry<string> Color1; internal static ConfigEntry<string> Color2; internal static ConfigEntry<string> Color3; public static EnemyHealthBars Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } internal static AssetBundle assetBundle { get; private set; } internal static GameObject HPBarPrefab { get; set; } public static bool IsLethalMinLoaded => Chainloader.PluginInfos.ContainsKey("NoteBoxz.LethalMin"); internal static ConfigEntry<HPLayoutEnum> HPLayout { get; set; } internal static ConfigEntry<VisibiltySettings> VisSettings { get; set; } internal static ConfigEntry<string> BlackList { get; set; } public static List<string> GetParsedAttackBlacklist() { if (string.IsNullOrEmpty(BlackList.Value)) { return new List<string>(); } return BlackList.Value.Split(',').ToList(); } public static Vector3? ParseVector3(string input) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrWhiteSpace(input)) { return null; } string[] array = input.Split(' '); if (array.Length != 3) { return null; } if (float.TryParse(array[0], out var result) && float.TryParse(array[1], out var result2) && float.TryParse(array[2], out var result3)) { return new Vector3(result, result2, result3); } return null; } public static Color? ParseColor(string input) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) string[] array = input.Trim('(', ')').Split(','); if (array.Length == 4 && int.TryParse(array[0], out var result) && int.TryParse(array[1], out var result2) && int.TryParse(array[2], out var result3) && int.TryParse(array[3], out var result4)) { return new Color((float)result / 255f, (float)result2 / 255f, (float)result3 / 255f, (float)result4 / 255f); } return null; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; Patch(); BindConfigs(); LoadAssetBundle(); HPBarPrefab = assetBundle.LoadAsset<GameObject>("Assets/ModAsset/HPBar.prefab"); Logger.LogInfo((object)"NoteBoxz.EnemyHealthBars v1.3.2 has loaded!"); } public void BindConfigs() { HPLayout = ((BaseUnityPlugin)this).Config.Bind<HPLayoutEnum>("Settings", "HP Layout", HPLayoutEnum.Bar, "The way the HP Bar will look"); HPLayout.SettingChanged += delegate { UpdateAllBars(); }; VisSettings = ((BaseUnityPlugin)this).Config.Bind<VisibiltySettings>("Settings", "Visibilty Settings", VisibiltySettings.OnlyShowWhenDamaged, ""); VisSettings.SettingChanged += delegate { UpdateAllBars(); }; VisDistance = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "Visibilty Distance", 12f, ""); VisDuration = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "Visibilty Duration", 5f, ""); BlackList = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Enemy Blacklist", "Pikmin,Puffmin,Docile Locust Bees,Manticoil", "The list of enemy names that wont have Health Bars (separated by commas, no spaces in between) (item1,item2,item3...)"); DefultYoffset = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "Defult Y Offset", 0.5f, "The Y offset for the defult HealthBar Offset (Will not take affect if Override Offset is set)"); OverrideOffset = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Override Offset", "", "The offset position of the health bar on an enemy. The top of an enemy's hitbox is defult (sperated by spaces, no commas, no brackets) 0 4 0"); HPScale = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "Scale", 1f, "The size of the Health Bar"); Color1 = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Primary Color", "(0,255,0,255)", "The primary color of the Health Bar, (With parentheses, seperated by commas, no spaces, 255 max value) (0,255,0,255)"); Color2 = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Secondary Color", "(255,0,0,255)", "The secondary color of the Health Bar, (With parentheses, seperated by commas, no spaces, 255 max value) (255,0,0,255)"); Color3 = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Background Color", "(0,0,0,255)", "The background color of the Health Bar, (With parentheses, seperated by commas, no spaces, 255 max value) (0,0,0,255)"); } public void UpdateAllBars() { try { HealthBar[] array = Object.FindObjectsOfType<HealthBar>(); HealthBar[] array2 = array; foreach (HealthBar healthBar in array2) { healthBar.UpdateLayoutVisibilty(); } } catch (Exception arg) { Logger.LogWarning((object)$"Failed to Update All HP Bars due to: {arg}"); } } internal static void LoadAssetBundle() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (directoryName == null) { throw new InvalidOperationException("Unable to determine assembly location."); } string text = Path.Combine(directoryName, "enemyhpassets"); assetBundle = AssetBundle.LoadFromFile(text); if ((Object)(object)assetBundle == (Object)null) { throw new InvalidOperationException("Failed to load AssetBundle."); } } internal static void Patch() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("NoteBoxz.EnemyHealthBars"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "NoteBoxz.EnemyHealthBars"; public const string PLUGIN_NAME = "EnemyHealthBars"; public const string PLUGIN_VERSION = "1.3.2"; } } namespace EnemyHealthBars.Scripts { public class HealthBar : MonoBehaviour { public EnemyAI AI = null; public Object? PikminEnemy = null; public HPLayout[] Layouts = new HPLayout[1]; public HPLayout CurLayout = null; public Vector3 Offset; public float NormalizedHP; private int InitalHP; private float LethalMinHP = 0f; public float Timer; public void Start() { UpdateLayoutVisibilty(); if (!((Object)(object)AI == (Object)null)) { InitalHP = AI.enemyHP; if (EnemyHealthBars.IsLethalMinLoaded) { GetLMPikminEnemy(); } } } private void GetLMPikminEnemy() { PikminEnemy = (Object?)(object)((Component)AI).GetComponent<PikminEnemy>(); Object? pikminEnemy = PikminEnemy; PikminEnemy val = (PikminEnemy)(object)((pikminEnemy is PikminEnemy) ? pikminEnemy : null); if ((Object)(object)val == (Object)null) { return; } val.OnHit.AddListener((UnityAction<float>)delegate { if (EnemyHealthBars.VisSettings.Value == EnemyHealthBars.VisibiltySettings.OnlyShowWhenDamaged && !EnemyHealthBars.GetParsedAttackBlacklist().Contains(AI.enemyType.enemyName)) { Timer = EnemyHealthBars.VisDuration.Value; } }); } public void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)AI == (Object)null) { return; } if (EnemyHealthBars.IsLethalMinLoaded) { SetLethalMinHP(); } CurLayout = Layouts[(int)EnemyHealthBars.HPLayout.Value]; ((Component)this).transform.localPosition = Offset; NormalizedHP = (AI.isEnemyDead ? 0f : (((float)AI.enemyHP - LethalMinHP) / (float)InitalHP)); if (((Component)CurLayout).gameObject.activeSelf) { if ((Object)(object)CurLayout.Bar != (Object)null) { CurLayout.Bar.fillAmount = NormalizedHP; } if ((Object)(object)CurLayout.text != (Object)null) { CurLayout.text.text = ((float)AI.enemyHP - LethalMinHP).ToString("F2") + "/" + InitalHP.ToString("F2"); } } } public void SetLethalMinHP() { if (PikminEnemy != (Object)null) { ref float lethalMinHP = ref LethalMinHP; Object? pikminEnemy = PikminEnemy; lethalMinHP = ((PikminEnemy)(((pikminEnemy is PikminEnemy) ? pikminEnemy : null)?)).DamageCounter ?? 0f; } } public void LateUpdate() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = new Vector3(EnemyHealthBars.HPScale.Value, EnemyHealthBars.HPScale.Value, EnemyHealthBars.HPScale.Value); if ((Object)(object)CurLayout == (Object)null) { return; } Color? val = null; val = EnemyHealthBars.ParseColor(EnemyHealthBars.Color1.Value); Color? val2 = null; val2 = EnemyHealthBars.ParseColor(EnemyHealthBars.Color2.Value); Color? val3 = null; val3 = EnemyHealthBars.ParseColor(EnemyHealthBars.Color3.Value); if ((Object)(object)CurLayout.Bar != (Object)null && val.HasValue) { ((Graphic)CurLayout.Bar).color = val.Value; } if ((Object)(object)CurLayout.BottomBar != (Object)null && val2.HasValue) { ((Graphic)CurLayout.BottomBar).color = val2.Value; } if ((Object)(object)CurLayout.text != (Object)null && val.HasValue && val2.HasValue) { ((Graphic)CurLayout.text).color = Color.Lerp(val2.Value, val.Value, NormalizedHP); } if ((Object)(object)CurLayout.BG != (Object)null && val3.HasValue) { ((Graphic)CurLayout.BG).color = val3.Value; } switch (EnemyHealthBars.VisSettings.Value) { case EnemyHealthBars.VisibiltySettings.AlwaysShow: ((Component)CurLayout).gameObject.SetActive((Object)(object)AI != (Object)null && !AI.isEnemyDead && Vector3.Distance(((Component)StartOfRound.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < EnemyHealthBars.VisDistance.Value); break; case EnemyHealthBars.VisibiltySettings.OnlyShowWhenDamaged: ((Component)CurLayout).gameObject.SetActive(Timer > 0f); if (Timer > 0f) { Timer -= Time.deltaTime; } break; } } public void UpdateLayoutVisibilty() { HPLayout[] layouts = Layouts; foreach (HPLayout hPLayout in layouts) { if ((Object)(object)hPLayout != (Object)(object)CurLayout) { ((Component)hPLayout).gameObject.SetActive(false); } else { ((Component)hPLayout).gameObject.SetActive(true); } } } } public class HPLayout : MonoBehaviour { public Image Bar = null; public Image BottomBar = null; public Image BG = null; public TMP_Text text = null; } public class TestBar : MonoBehaviour { public Image img = null; public float A; public float B; private void Update() { img.fillAmount = A / B; } } } namespace EnemyHealthBars.Patches { [HarmonyPatch(typeof(EnemyAI))] public class EnemyAIPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void StartPosfix(EnemyAI __instance) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) try { if (!EnemyHealthBars.GetParsedAttackBlacklist().Contains(__instance.enemyType.enemyName)) { HealthBar component = Object.Instantiate<GameObject>(EnemyHealthBars.HPBarPrefab, ((Component)__instance).transform).GetComponent<HealthBar>(); ((Object)((Component)component).gameObject).name = ((Object)((Component)component).gameObject).name.Replace("(Clone)", "") ?? ""; component.AI = __instance; Vector3? val = EnemyHealthBars.ParseVector3(EnemyHealthBars.OverrideOffset.Value); if (val.HasValue) { component.Offset = val.Value; } else if ((Object)(object)((Component)__instance).GetComponentInChildren<NavMeshAgent>() != (Object)null) { component.Offset = new Vector3(0f, ((Component)__instance).GetComponentInChildren<NavMeshAgent>().height + EnemyHealthBars.DefultYoffset.Value, 0f); } } } catch (Exception arg) { Debug.Log((object)$"Failed to give {((Object)__instance).name} a health bar due to: {arg}"); } } [HarmonyPatch("HitEnemy")] [HarmonyPostfix] private static void HitEnemy(EnemyAI __instance) { if (EnemyHealthBars.VisSettings.Value == EnemyHealthBars.VisibiltySettings.OnlyShowWhenDamaged && !EnemyHealthBars.GetParsedAttackBlacklist().Contains(__instance.enemyType.enemyName)) { HealthBar componentInChildren = ((Component)__instance).GetComponentInChildren<HealthBar>(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.Timer = EnemyHealthBars.VisDuration.Value; } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }