static bool Prefix(float _dt, XUiC_TargetBar __instance) { foreach (Entity entity in GameManager.Instance.World.Entities.list) { EntityAlive entity1 = entity as EntityAlive; EntityAlive entityAlive = null; WorldRayHitInfo hitInfo = __instance.xui.playerUI.entityPlayer.HitInfo; if (hitInfo.bHitValid && hitInfo.transform && hitInfo.tag.StartsWith("E_")) { Transform hitRootTransform; if ((hitRootTransform = GameUtils.GetHitRootTransform(hitInfo.tag, hitInfo.transform)) != null) { entityAlive = hitRootTransform.GetComponent <EntityAlive>(); } bool flag = entityAlive != null && entityAlive.IsAlive(); if (flag) { if (entityAlive.IsSleeping) { //__instance.ViewComponent.IsVisible = false; return(false); } else { //__instance.ViewComponent.IsVisible = true; return(true); } } } } return(true); }
public static bool Prefix(XUiC_TargetBar __instance, ref XUiView ___viewComponent) { // Check if this feature is enabled. if (!Configuration.CheckFeatureStatus(AdvFeatureClass, Feature)) // if disables, don't execute the base Update() { return(false); } return(true); }
public static bool Prefix(XUiC_TargetBar __instance) { EntityAlive entityAlive = null; WorldRayHitInfo hitInfo = __instance.xui.playerUI.entityPlayer.HitInfo; if (hitInfo.bHitValid && hitInfo.transform && hitInfo.tag.StartsWith("E_")) { Transform hitRootTransform; if ((hitRootTransform = GameUtils.GetHitRootTransform(hitInfo.tag, hitInfo.transform)) != null) { entityAlive = hitRootTransform.GetComponent <EntityAlive>(); } if (entityAlive != null && entityAlive.IsAlive()) { if (SphereII_InertEntity.IsInert(entityAlive)) { return(false); } } } return(true); }