Beispiel #1
0
 public static void closeAll()
 {
     MenuPauseUI.close();
     MenuCreditsUI.close();
     MenuTitleUI.close();
     MenuDashboardUI.close();
     MenuPlayUI.close();
     MenuPlaySingleplayerUI.close();
     MenuPlayMatchmakingUI.close();
     MenuPlayLobbiesUI.close();
     MenuPlayConnectUI.close();
     MenuPlayServersUI.close();
     MenuPlayServerInfoUI.close();
     MenuPlayConfigUI.close();
     MenuSurvivorsUI.close();
     MenuSurvivorsCharacterUI.close();
     MenuSurvivorsAppearanceUI.close();
     MenuSurvivorsClothingUI.close();
     MenuSurvivorsGroupUI.close();
     MenuSurvivorsClothingBoxUI.close();
     MenuSurvivorsClothingDeleteUI.close();
     MenuSurvivorsClothingInspectUI.close();
     MenuSurvivorsClothingItemUI.close();
     MenuConfigurationUI.close();
     MenuConfigurationOptionsUI.close();
     MenuConfigurationDisplayUI.close();
     MenuConfigurationGraphicsUI.close();
     MenuConfigurationControlsUI.close();
     MenuWorkshopUI.close();
     MenuWorkshopEditorUI.close();
     MenuWorkshopSubmitUI.close();
 }
Beispiel #2
0
 // Token: 0x0600376A RID: 14186 RVA: 0x00184020 File Offset: 0x00182420
 private static void onInventoryExchanged(int newItem, ushort newQuantity, ulong newInstance)
 {
     if (!MenuSurvivorsClothingUI.isCrafting)
     {
         return;
     }
     MenuSurvivorsClothingUI.isCrafting = false;
     MenuUI.closeAlert();
     MenuUI.alert(MenuSurvivorsClothingUI.localization.format("Origin_Craft"), newInstance, newItem, newQuantity);
     MenuSurvivorsClothingItemUI.viewItem(newItem, newQuantity, newInstance);
     MenuSurvivorsClothingItemUI.open();
     MenuSurvivorsClothingUI.close();
 }
 // Token: 0x0600374C RID: 14156 RVA: 0x0018261C File Offset: 0x00180A1C
 private static void onClickedScrapButton(SleekButton button)
 {
     if (Provider.provider.economyService.getInventoryMythicID(MenuSurvivorsClothingItemUI.item) != 0)
     {
         MenuSurvivorsClothingDeleteUI.viewItem(MenuSurvivorsClothingItemUI.item, MenuSurvivorsClothingItemUI.instance, EDeleteMode.SALVAGE, 0UL);
         MenuSurvivorsClothingDeleteUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else
     {
         MenuSurvivorsClothingDeleteUI.salvageItem(MenuSurvivorsClothingItemUI.item, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingItemUI.onClickedBackButton(MenuSurvivorsClothingItemUI.backButton);
     }
 }
 // Token: 0x06003748 RID: 14152 RVA: 0x00182500 File Offset: 0x00180900
 private static void onClickedUseButton(SleekButton button)
 {
     if (MenuSurvivorsClothingItemUI.packageBox.itemAsset != null && MenuSurvivorsClothingItemUI.packageBox.itemAsset.type == EItemType.KEY)
     {
         MenuSurvivorsClothingUI.setFilter(EEconFilterMode.STAT_TRACKER, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else if (MenuSurvivorsClothingItemUI.packageBox.itemAsset != null && MenuSurvivorsClothingItemUI.packageBox.itemAsset.type == EItemType.BOX)
     {
         MenuSurvivorsClothingBoxUI.viewItem(MenuSurvivorsClothingItemUI.item, MenuSurvivorsClothingItemUI.quantity, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingBoxUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else
     {
         Characters.package(MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingItemUI.viewItem();
     }
 }
Beispiel #5
0
 private void Update()
 {
     if (MenuUI.window == null)
     {
         return;
     }
     MenuConfigurationControlsUI.bindUpdate();
     if (MenuConfigurationControlsUI.binding == 255)
     {
         if (Input.GetKeyDown(27))
         {
             if (Provider.provider.matchmakingService.isAttemptingServerQuery)
             {
                 Provider.provider.matchmakingService.cancel();
             }
             else if (MenuUI.isAlerting)
             {
                 MenuUI.closeAlert();
                 MenuUI.isAlerting = false;
             }
             else if (MenuPauseUI.active)
             {
                 MenuPauseUI.close();
                 MenuDashboardUI.open();
                 MenuTitleUI.open();
             }
             else if (MenuCreditsUI.active)
             {
                 MenuCreditsUI.close();
                 MenuPauseUI.open();
             }
             else if (MenuTitleUI.active)
             {
                 MenuPauseUI.open();
                 MenuDashboardUI.close();
                 MenuTitleUI.close();
             }
             else if (MenuPlayConfigUI.active)
             {
                 MenuPlayConfigUI.close();
                 MenuPlaySingleplayerUI.open();
             }
             else if (MenuPlayServerInfoUI.active)
             {
                 MenuPlayServerInfoUI.close();
                 MenuPlayServerInfoUI.EServerInfoOpenContext openContext = MenuPlayServerInfoUI.openContext;
                 if (openContext != MenuPlayServerInfoUI.EServerInfoOpenContext.CONNECT)
                 {
                     if (openContext != MenuPlayServerInfoUI.EServerInfoOpenContext.SERVERS)
                     {
                         if (openContext == MenuPlayServerInfoUI.EServerInfoOpenContext.MATCHMAKING)
                         {
                             MenuPlayMatchmakingUI.open();
                         }
                     }
                     else
                     {
                         MenuPlayServersUI.open();
                     }
                 }
                 else
                 {
                     MenuPlayConnectUI.open();
                 }
             }
             else if (MenuPlayConnectUI.active || MenuPlayServersUI.active || MenuPlaySingleplayerUI.active || MenuPlayMatchmakingUI.active || MenuPlayLobbiesUI.active)
             {
                 MenuPlayConnectUI.close();
                 MenuPlayServersUI.close();
                 MenuPlaySingleplayerUI.close();
                 MenuPlayMatchmakingUI.close();
                 MenuPlayLobbiesUI.close();
                 MenuPlayUI.open();
             }
             else if (MenuSurvivorsClothingItemUI.active)
             {
                 MenuSurvivorsClothingItemUI.close();
                 MenuSurvivorsClothingUI.open();
             }
             else if (MenuSurvivorsClothingBoxUI.active)
             {
                 if (!MenuSurvivorsClothingBoxUI.isUnboxing)
                 {
                     MenuSurvivorsClothingBoxUI.close();
                     MenuSurvivorsClothingItemUI.open();
                 }
             }
             else if (MenuSurvivorsClothingInspectUI.active || MenuSurvivorsClothingDeleteUI.active)
             {
                 MenuSurvivorsClothingInspectUI.close();
                 MenuSurvivorsClothingDeleteUI.close();
                 MenuSurvivorsClothingItemUI.open();
             }
             else if (MenuSurvivorsCharacterUI.active || MenuSurvivorsAppearanceUI.active || MenuSurvivorsGroupUI.active || MenuSurvivorsClothingUI.active)
             {
                 MenuSurvivorsCharacterUI.close();
                 MenuSurvivorsAppearanceUI.close();
                 MenuSurvivorsGroupUI.close();
                 MenuSurvivorsClothingUI.close();
                 MenuSurvivorsUI.open();
             }
             else if (MenuConfigurationOptionsUI.active || MenuConfigurationControlsUI.active || MenuConfigurationGraphicsUI.active || MenuConfigurationDisplayUI.active)
             {
                 MenuConfigurationOptionsUI.close();
                 MenuConfigurationControlsUI.close();
                 MenuConfigurationGraphicsUI.close();
                 MenuConfigurationDisplayUI.close();
                 MenuConfigurationUI.open();
             }
             else if (MenuWorkshopSubmitUI.active || MenuWorkshopEditorUI.active || MenuWorkshopErrorUI.active || MenuWorkshopLocalizationUI.active || MenuWorkshopSpawnsUI.active || MenuWorkshopModulesUI.active)
             {
                 MenuWorkshopSubmitUI.close();
                 MenuWorkshopEditorUI.close();
                 MenuWorkshopErrorUI.close();
                 MenuWorkshopLocalizationUI.close();
                 MenuWorkshopSpawnsUI.close();
                 MenuWorkshopModulesUI.close();
                 MenuWorkshopUI.open();
             }
             else
             {
                 MenuPlayUI.close();
                 MenuSurvivorsUI.close();
                 MenuConfigurationUI.close();
                 MenuWorkshopUI.close();
                 MenuDashboardUI.open();
                 MenuTitleUI.open();
             }
         }
         if (MenuUI.window != null)
         {
             if (Input.GetKeyDown(ControlsSettings.screenshot))
             {
                 Provider.takeScreenshot();
             }
             if (Input.GetKeyDown(ControlsSettings.hud))
             {
                 DevkitWindowManager.isActive          = false;
                 MenuUI.window.isEnabled               = !MenuUI.window.isEnabled;
                 MenuUI.window.drawCursorWhileDisabled = false;
             }
             if (Input.GetKeyDown(ControlsSettings.terminal))
             {
                 DevkitWindowManager.isActive          = !DevkitWindowManager.isActive;
                 MenuUI.window.isEnabled               = !DevkitWindowManager.isActive;
                 MenuUI.window.drawCursorWhileDisabled = DevkitWindowManager.isActive;
             }
         }
     }
     if (Input.GetKeyDown(ControlsSettings.refreshAssets))
     {
         Assets.refresh();
     }
     if (Input.GetKeyDown(ControlsSettings.clipboardDebug) && MenuSurvivorsAppearanceUI.active)
     {
         string text = string.Empty;
         text = text + "Face " + Characters.active.face;
         text = text + "\nHair " + Characters.active.hair;
         text = text + "\nBeard " + Characters.active.beard;
         text = text + "\nColor_Skin " + Palette.hex(Characters.active.skin);
         text = text + "\nColor_Hair " + Palette.hex(Characters.active.color);
         if (Characters.active.hand)
         {
             text += "\nBackward";
         }
         GUIUtility.systemCopyBuffer = text;
     }
     if (MenuUI.isAlerting && Time.realtimeSinceStartup - MenuUI.lastAlert > MenuUI.alertTime)
     {
         MenuUI.closeAlert();
         MenuUI.isAlerting = false;
     }
     MenuUI.window.showCursor = true;
     MenuUI.window.updateDebug();
     if (MenuPlayUI.active || MenuPlayConnectUI.active || MenuPlayServersUI.active || MenuPlayServerInfoUI.active || MenuPlaySingleplayerUI.active || MenuPlayMatchmakingUI.active || MenuPlayLobbiesUI.active || MenuPlayConfigUI.active)
     {
         this.target = this.play;
     }
     else if (MenuSurvivorsUI.active || MenuSurvivorsCharacterUI.active || MenuSurvivorsAppearanceUI.active || MenuSurvivorsGroupUI.active || MenuSurvivorsClothingUI.active || MenuSurvivorsClothingItemUI.active || MenuSurvivorsClothingInspectUI.active || MenuSurvivorsClothingDeleteUI.active || MenuSurvivorsClothingBoxUI.active)
     {
         this.target = this.survivors;
     }
     else if (MenuConfigurationUI.active || MenuConfigurationOptionsUI.active || MenuConfigurationControlsUI.active || MenuConfigurationGraphicsUI.active || MenuConfigurationDisplayUI.active)
     {
         this.target = this.configuration;
     }
     else if (MenuWorkshopUI.active || MenuWorkshopSubmitUI.active || MenuWorkshopEditorUI.active || MenuWorkshopErrorUI.active || MenuWorkshopLocalizationUI.active || MenuWorkshopSpawnsUI.active || MenuWorkshopModulesUI.active)
     {
         this.target = this.workshop;
     }
     else
     {
         this.target = this.title;
     }
     if (this.target == this.title)
     {
         if (MenuUI.hasTitled)
         {
             base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime * 4f);
             base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime * 4f);
         }
         else
         {
             base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime);
             base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime);
         }
     }
     else
     {
         MenuUI.hasTitled        = true;
         base.transform.position = Vector3.Lerp(base.transform.position, this.target.position, Time.deltaTime * 4f);
         base.transform.rotation = Quaternion.Lerp(base.transform.rotation, this.target.rotation, Time.deltaTime * 4f);
     }
 }
Beispiel #6
0
 public static void update()
 {
     if (!MenuSurvivorsClothingBoxUI.isUnboxing)
     {
         return;
     }
     if (Time.realtimeSinceStartup - MenuSurvivorsClothingBoxUI.lastUnbox > (float)Provider.CLIENT_TIMEOUT)
     {
         MenuSurvivorsClothingBoxUI.isUnboxing           = false;
         MenuSurvivorsClothingBoxUI.backButton.isVisible = true;
         MenuUI.alert(MenuSurvivorsClothingBoxUI.localization.format("Exchange_Timed_Out"));
         MenuSurvivorsClothingUI.open();
         MenuSurvivorsClothingBoxUI.close();
         return;
     }
     if (MenuSurvivorsClothingBoxUI.rotation == MenuSurvivorsClothingBoxUI.target)
     {
         if (Time.realtimeSinceStartup - MenuSurvivorsClothingBoxUI.lastAngle > 0.5f)
         {
             MenuSurvivorsClothingBoxUI.isUnboxing           = false;
             MenuSurvivorsClothingBoxUI.backButton.isVisible = true;
             if (MenuSurvivorsClothingBoxUI.boxAsset.destroy == 0)
             {
                 MenuUI.alert(MenuSurvivorsClothingBoxUI.localization.format("Origin_Unwrap"), MenuSurvivorsClothingBoxUI.got, MenuSurvivorsClothingBoxUI.drop, 1);
             }
             else
             {
                 MenuUI.alert(MenuSurvivorsClothingBoxUI.localization.format("Origin_Unbox"), MenuSurvivorsClothingBoxUI.got, MenuSurvivorsClothingBoxUI.drop, 1);
             }
             MenuSurvivorsClothingItemUI.viewItem(MenuSurvivorsClothingBoxUI.drop, 1, MenuSurvivorsClothingBoxUI.got);
             MenuSurvivorsClothingItemUI.open();
             MenuSurvivorsClothingBoxUI.close();
             if (MenuSurvivorsClothingBoxUI.isMythical)
             {
                 MainCamera.instance.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Economy/Sounds/Mythical"), 0.66f);
             }
             else
             {
                 MainCamera.instance.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Economy/Sounds/Unbox"), 0.66f);
             }
         }
     }
     else
     {
         if (MenuSurvivorsClothingBoxUI.rotation < MenuSurvivorsClothingBoxUI.target - MenuSurvivorsClothingBoxUI.boxAsset.drops.Length || MenuSurvivorsClothingBoxUI.target == -1)
         {
             if (MenuSurvivorsClothingBoxUI.angle < 12.566371f)
             {
                 MenuSurvivorsClothingBoxUI.angle += (Time.realtimeSinceStartup - MenuSurvivorsClothingBoxUI.lastAngle) * MenuSurvivorsClothingBoxUI.size * Mathf.Lerp(80f, 20f, MenuSurvivorsClothingBoxUI.angle / 12.566371f);
             }
             else
             {
                 MenuSurvivorsClothingBoxUI.angle += (Time.realtimeSinceStartup - MenuSurvivorsClothingBoxUI.lastAngle) * MenuSurvivorsClothingBoxUI.size * 20f;
             }
         }
         else
         {
             MenuSurvivorsClothingBoxUI.angle += (Time.realtimeSinceStartup - MenuSurvivorsClothingBoxUI.lastAngle) * Mathf.Max(((float)MenuSurvivorsClothingBoxUI.target - MenuSurvivorsClothingBoxUI.angle / (6.28318548f / (float)MenuSurvivorsClothingBoxUI.boxAsset.drops.Length)) / (float)MenuSurvivorsClothingBoxUI.boxAsset.drops.Length, 0.05f) * MenuSurvivorsClothingBoxUI.size * 20f;
         }
         MenuSurvivorsClothingBoxUI.lastAngle = Time.realtimeSinceStartup;
         MenuSurvivorsClothingBoxUI.rotation  = (int)(MenuSurvivorsClothingBoxUI.angle / (6.28318548f / (float)MenuSurvivorsClothingBoxUI.boxAsset.drops.Length));
         if (MenuSurvivorsClothingBoxUI.rotation == MenuSurvivorsClothingBoxUI.target)
         {
             MenuSurvivorsClothingBoxUI.angle = (float)MenuSurvivorsClothingBoxUI.rotation * (6.28318548f / (float)MenuSurvivorsClothingBoxUI.boxAsset.drops.Length);
         }
         for (int i = 0; i < MenuSurvivorsClothingBoxUI.boxAsset.drops.Length; i++)
         {
             float num = 6.28318548f * (float)i / (float)MenuSurvivorsClothingBoxUI.boxAsset.drops.Length + 3.14159274f;
             MenuSurvivorsClothingBoxUI.dropButtons[i].positionScale_X = 0.5f + Mathf.Cos(MenuSurvivorsClothingBoxUI.angle - num) * (0.5f - MenuSurvivorsClothingBoxUI.size / 2f) - MenuSurvivorsClothingBoxUI.size / 2f;
             MenuSurvivorsClothingBoxUI.dropButtons[i].positionScale_Y = 0.5f + Mathf.Sin(MenuSurvivorsClothingBoxUI.angle - num) * (0.5f - MenuSurvivorsClothingBoxUI.size / 2f) - MenuSurvivorsClothingBoxUI.size / 2f;
         }
         if (MenuSurvivorsClothingBoxUI.rotation != MenuSurvivorsClothingBoxUI.lastRotation)
         {
             MenuSurvivorsClothingBoxUI.lastRotation = MenuSurvivorsClothingBoxUI.rotation;
             MenuSurvivorsClothingBoxUI.boxButton.positionScale_Y = 0.25f;
             MenuSurvivorsClothingBoxUI.boxButton.lerpPositionScale(0.3f, 0.3f, ESleekLerp.EXPONENTIAL, 20f);
             MenuSurvivorsClothingBoxUI.boxButton.updateInventory(0UL, MenuSurvivorsClothingBoxUI.boxAsset.drops[MenuSurvivorsClothingBoxUI.rotation % MenuSurvivorsClothingBoxUI.boxAsset.drops.Length], 1, false, true);
             if (MenuSurvivorsClothingBoxUI.rotation == MenuSurvivorsClothingBoxUI.target)
             {
                 MainCamera.instance.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Economy/Sounds/Drop"), 0.33f);
             }
             else
             {
                 MainCamera.instance.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Economy/Sounds/Tick"), 0.33f);
             }
         }
     }
 }
Beispiel #7
0
        // Token: 0x06002A36 RID: 10806 RVA: 0x00106B0C File Offset: 0x00104F0C
        private void onClickedMouse()
        {
            if (!MenuSurvivorsClothingUI.active && !MenuSurvivorsClothingItemUI.active)
            {
                return;
            }
            Ray        ray = MainCamera.instance.ScreenPointToRay(Input.mousePosition);
            RaycastHit raycastHit;

            Physics.Raycast(ray, out raycastHit, 64f, RayMasks.CLOTHING_INTERACT);
            if (raycastHit.transform != null)
            {
                if (raycastHit.transform.CompareTag("Player"))
                {
                    ELimb limb = DamageTool.getLimb(raycastHit.transform);
                    if (limb == ELimb.LEFT_FOOT || limb == ELimb.LEFT_LEG || limb == ELimb.RIGHT_FOOT || limb == ELimb.RIGHT_LEG)
                    {
                        if (Characters.active.packagePants != 0UL)
                        {
                            Characters.package(Characters.active.packagePants);
                        }
                    }
                    else if ((limb == ELimb.LEFT_HAND || limb == ELimb.LEFT_ARM || limb == ELimb.RIGHT_HAND || limb == ELimb.RIGHT_ARM || limb == ELimb.SPINE) && Characters.active.packageShirt != 0UL)
                    {
                        Characters.package(Characters.active.packageShirt);
                    }
                }
                else if (raycastHit.transform.CompareTag("Enemy"))
                {
                    if (raycastHit.transform.name == "Hat")
                    {
                        if (Characters.active.packageHat != 0UL)
                        {
                            Characters.package(Characters.active.packageHat);
                        }
                    }
                    else if (raycastHit.transform.name == "Glasses")
                    {
                        if (Characters.active.packageGlasses != 0UL)
                        {
                            Characters.package(Characters.active.packageGlasses);
                        }
                    }
                    else if (raycastHit.transform.name == "Mask")
                    {
                        if (Characters.active.packageMask != 0UL)
                        {
                            Characters.package(Characters.active.packageMask);
                        }
                    }
                    else if (raycastHit.transform.name == "Vest")
                    {
                        if (Characters.active.packageVest != 0UL)
                        {
                            Characters.package(Characters.active.packageVest);
                        }
                    }
                    else if (raycastHit.transform.name == "Backpack" && Characters.active.packageBackpack != 0UL)
                    {
                        Characters.package(Characters.active.packageBackpack);
                    }
                }
                if (MenuSurvivorsClothingItemUI.active)
                {
                    MenuSurvivorsClothingItemUI.viewItem();
                }
            }
        }