예제 #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 HUDAwake(On.RoR2.UI.HUD.orig_Awake orig, RoR2.UI.HUD self)
        {
            orig(self);

            if (!ArtifactIsActive)
            {
                return;
            }

            HUDRoot = self.transform.root;


            MainExpBarStart();
        }
        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();
        }