Beispiel #1
0
        // Token: 0x060021BC RID: 8636 RVA: 0x00091FF4 File Offset: 0x000901F4
        private static void SetHudDisplayingArenaInfoPanel(HUD hud, bool shouldDisplay)
        {
            List <ArenaInfoPanel> instancesList  = InstanceTracker.GetInstancesList <ArenaInfoPanel>();
            ArenaInfoPanel        arenaInfoPanel = null;

            for (int i = 0; i < instancesList.Count; i++)
            {
                ArenaInfoPanel arenaInfoPanel2 = instancesList[i];
                if (arenaInfoPanel2.hud == hud)
                {
                    arenaInfoPanel = arenaInfoPanel2;
                    break;
                }
            }
            if (arenaInfoPanel != shouldDisplay)
            {
                if (!arenaInfoPanel)
                {
                    Transform parent = (RectTransform)hud.GetComponent <ChildLocator>().FindChild("RightInfoBar");
                    UnityEngine.Object.Instantiate <GameObject>(ArenaInfoPanel.panelPrefab, parent).GetComponent <ArenaInfoPanel>().hud = hud;
                    return;
                }
                UnityEngine.Object.Destroy(arenaInfoPanel.gameObject);
            }
        }
Beispiel #2
0
        // Token: 0x060021BE RID: 8638 RVA: 0x0009209C File Offset: 0x0009029C
        private static void ArenaMissionControllerOnOnInstanceChangedGlobal()
        {
            bool flag = ArenaMissionController.instance;

            if (ArenaInfoPanel.subscribedToHudTargetChanged != flag)
            {
                if (!ArenaInfoPanel.subscribedToHudTargetChanged)
                {
                    HUD.onHudTargetChangedGlobal += ArenaInfoPanel.OnHudTargetChangedGlobal;
                }
                else
                {
                    HUD.onHudTargetChangedGlobal -= ArenaInfoPanel.OnHudTargetChangedGlobal;
                }
                ArenaInfoPanel.subscribedToHudTargetChanged = !ArenaInfoPanel.subscribedToHudTargetChanged;
                for (int i = 0; i < HUD.readOnlyInstanceList.Count; i++)
                {
                    ArenaInfoPanel.SetHudDisplayingArenaInfoPanel(HUD.readOnlyInstanceList[i], flag);
                }
            }
        }
Beispiel #3
0
        // Token: 0x060021BF RID: 8639 RVA: 0x0009211C File Offset: 0x0009031C
        private static void OnHudTargetChangedGlobal(HUD hud)
        {
            bool shouldDisplay = ArenaMissionController.instance;

            ArenaInfoPanel.SetHudDisplayingArenaInfoPanel(hud, shouldDisplay);
        }