Пример #1
0
        private void RaveUI(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);

            RaveTint            = new GameObject();
            RaveTint.name       = "RaveTint";
            RaveTintRect        = RaveTint.AddComponent <RectTransform>();
            RaveTintRect.parent = self.mainContainer.transform;

            //var test1 = self.mainUIPanel.GetComponent<RectTransform>();
            //var test2 = self.mainContainer.GetComponent<RectTransform>();
            //var test3 = self.transform.GetComponent<RectTransform>();
            //if (test1)
            //{
            //  Debug.Log("MainPannel height: " + test1.rect.height + "  width: " + test1.rect.width);
            //}
            //if (test2)
            //{
            //  Debug.Log("Maincontainter height: " + test2.rect.height + "  width: " + test2.rect.width);
            //}
            //if (test3)
            //{
            //  Debug.Log("Maincontainter height: " + test3.rect.height + "  width: " + test3.rect.width);
            //}
            //Screen.width;

            RaveTintRect.anchorMax = Vector2.one;
            RaveTintRect.anchorMin = Vector2.zero;
            //RaveTintRect..width = Screen.width;
            RaveTintRect.localScale       = new Vector3(10, 10, 10);
            RaveTintRect.anchoredPosition = Vector2.zero;
            RaveTintImg               = RaveTint.AddComponent <Image>();
            RaveTintImg.color         = new Color(1, 1, 1, 0f);
            RaveTintImg.raycastTarget = false;
        }
Пример #2
0
        public void InsuranceBarAwake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);

            var prefab = Resources.Load <GameObject>("@SupplyDrop:Assets/Main/Textures/UI/InsuranceBar.prefab");

            InsuranceBar = GameObject.Instantiate(prefab, self.mainContainer.transform);
            if (InsuranceBar)
            {
                var cachedSavingsComponent = self.targetMaster.gameObject.GetComponent <InsuranceSavingsTracker>();
                if (!cachedSavingsComponent)
                {
                    self.targetMaster.gameObject.AddComponent <InsuranceSavingsTracker>();
                }

                foreach (Range range in InsuranceDictionary.Values)
                {
                    if (cachedSavingsComponent.insuranceSavings >= range.Lower && cachedSavingsComponent.insuranceSavings < range.Upper)
                    {
                        InsuranceBar.GetComponentInChildren <Slider>().maxValue = Convert.ToSingle(range.Upper);
                    }
                }
                InsuranceBar.GetComponentInChildren <Slider>().value = cachedSavingsComponent.insuranceSavings;
            }
        }
Пример #3
0
        private void HUD_Awake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);
            var c**k = new GameObject();

            c**k.name = "dicks";
            c**k.AddComponent <Cleaner>();
        }
Пример #4
0
        private void HUD_Awake(On.RoR2.UI.HUD.orig_Awake orig, HUD self)
        {
            orig(self);
            var ehicomp = self.gameObject.AddComponent <EHIComponent>();

            ehicomp.hud             = self;
            ehicomp.characterMaster = self.targetMaster;
        }
Пример #5
0
 internal void HUD_Awake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
 {
     orig(self);
     HUD = self;
     foreach (ModComponent modComponent in modComponents)
     {
         modComponent.HUD_Awake();
     }
 }
Пример #6
0
        private void HUD_Awake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);

            var deathTimerGameobject = new GameObject("death_timer_box");

            deathTimerGameobject.transform.SetParent(self.mainContainer.transform);
            deathTimerGameobject.transform.SetAsFirstSibling();

            deathTimerPanel = deathTimerGameobject.AddComponent <DeathTimerPanel>();
        }
Пример #7
0
        private void ShowUnusedHUDElements(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);
            var mainUIArea  = self.gameObject.transform.Find("MainContainer").transform.Find("MainUIArea").transform.Find("SpringCanvas").transform;
            var speedometer = mainUIArea.Find("UpperRightCluster").transform.Find("TimerRoot").transform.Find("SpeedometerPanel").gameObject;

            speedometer.transform.parent = speedometer.transform.parent.transform.Find("RightInfoBar").transform;
            speedometer.SetActive(true);

            //mainUIArea.Find("UpperLeftCluster").transform.Find("InputStickVisualizer").gameObject.SetActive(true);
            //mainUIArea.Find("ScoreboardPanel").transform.Find("PP").gameObject.SetActive(false);
        }
Пример #8
0
        public void HUDAwake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);

            if (!ArtifactIsActive)
            {
                return;
            }

            HUDRoot = self.transform.root;


            MainExpBarStart();
        }
Пример #9
0
        internal static void HUDAwake(On.RoR2.UI.HUD.orig_Awake orig, HUD self)
        {
            orig(self);

            Misc.RageHUD rageHud = self.gameObject.AddComponent <Misc.RageHUD>();

            GameObject rageGauge = UnityEngine.Object.Instantiate <GameObject>(Modules.Assets.mainAssetBundle.LoadAsset <GameObject>("RageGauge"), self.transform.Find("MainContainer").Find("MainUIArea").Find("SpringCanvas").Find("BottomLeftCluster"));

            rageGauge.GetComponent <RectTransform>().localPosition    = Vector3.zero;
            rageGauge.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, -147.8f);
            rageGauge.GetComponent <RectTransform>().localScale       = new Vector3(0.72f, 0.15f, 1f);
            rageHud.rageGauge = rageGauge;
            rageHud.rageFill  = rageGauge.transform.Find("GaugeFill").gameObject.GetComponent <Image>();
        }
        public void HUDAwake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);
            NetworkClass.EnsureNetworking();
            Networking._instance.IsArtifactEnabled      = RunArtifactManager.instance.IsArtifactEnabled(ArtifactOfDoom.Transmutation.artifactIndex);
            Networking._instance.IsCalculationSacrifice = ArtifactOfDoomConfig.useArtifactOfSacrificeCalculation.Value;
            if (!Networking._instance.IsArtifactEnabled)
            {
                return;
            }

            HUDRoot = self.transform.root;


            MainExpBarStart();
        }
Пример #11
0
        internal static void HUDAwake(On.RoR2.UI.HUD.orig_Awake orig, HUD self)
        {
            orig(self);

            self.gameObject.AddComponent <ExtraHud>();
        }
Пример #12
0
 private void HUD_Awake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
 {
     CreateSpiralPowerGauge(self);
     orig(self);
 }