示例#1
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>();
        }
示例#2
0
        private void Run_OnDestroy(On.RoR2.Run.orig_OnDestroy orig, RoR2.Run self)
        {
            orig(self);

            deathTimerPanel = null;
        }