diff options
| author | chai <215380520@qq.com> | 2024-05-20 22:36:58 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-20 22:36:58 +0800 |
| commit | a22c505984697881f5f911a165ee022087b69e09 (patch) | |
| tree | d3c030aef1ae9b8a01c889dd2902bb1e3324e72b /Thronefall_1_0/Decompile/LevelSelectManager.cs | |
| parent | 4a4cc82d069b26bc4d4532e73860f86b211ca239 (diff) | |
Diffstat (limited to 'Thronefall_1_0/Decompile/LevelSelectManager.cs')
| -rw-r--r-- | Thronefall_1_0/Decompile/LevelSelectManager.cs | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/Thronefall_1_0/Decompile/LevelSelectManager.cs b/Thronefall_1_0/Decompile/LevelSelectManager.cs deleted file mode 100644 index 5650ffd..0000000 --- a/Thronefall_1_0/Decompile/LevelSelectManager.cs +++ /dev/null @@ -1,114 +0,0 @@ -using TMPro; -using UnityEngine; -using UnityEngine.UI; - -public class LevelSelectManager : MonoBehaviour -{ - public static LevelSelectManager instance; - - private LevelInteractor[] levelInteractors; - - public Vector3 spawnOnLevelOffsetPositon; - - public PlayerMovement playerMovement; - - public TMP_Text levelTitle; - - public TMP_Text levelHighscore; - - public TMP_Text beatenState; - - public string notBeatenYet = "Not beaten yet."; - - public string successfullyBeaten = "Successfully beaten."; - - public string scorePrefix = "Your Best: "; - - public GameObject tooltipObject; - - public Image tooltipImage; - - public TMP_Text tooltipTitle; - - public TMP_Text tooltipDescription; - - private Equippable showingTooltipFor; - - public Canvas levelSelectedCanvas; - - public Camera camMain; - - private LevelInteractor openedLevel; - - private int iFrames; - - private bool fixedLoadout; - - public Equippable ShowingTooltipFor => showingTooltipFor; - - public bool PreLevelMenuIsOpen => openedLevel != null; - - public void ShowTooltip(Equippable _eq) - { - showingTooltipFor = _eq; - tooltipObject.SetActive(_eq != null); - if (!(_eq == null)) - { - tooltipImage.sprite = _eq.icon; - tooltipTitle.text = _eq.displayName; - tooltipDescription.text = _eq.description; - float num = camMain.pixelRect.height / levelSelectedCanvas.pixelRect.height; - tooltipObject.transform.position = Input.mousePosition * num; - } - } - - private void Awake() - { - instance = this; - } - - private void Start() - { - levelInteractors = GetComponentsInChildren<LevelInteractor>(); - ShowTooltip(null); - } - - private void MovePlayerToTheLevelYouCameFrom() - { - SceneTransitionManager sceneTransitionManager = SceneTransitionManager.instance; - if (!sceneTransitionManager || sceneTransitionManager.ComingFromGameplayScene == "") - { - return; - } - for (int i = 0; i < levelInteractors.Length; i++) - { - if (levelInteractors[i].sceneName == sceneTransitionManager.ComingFromGameplayScene) - { - playerMovement.TeleportTo(levelInteractors[i].transform.position + spawnOnLevelOffsetPositon); - break; - } - } - } - - private void Update() - { - if (iFrames <= 1) - { - MovePlayerToTheLevelYouCameFrom(); - } - iFrames++; - } - - public void PlayButtonPressed() - { - if (PreLevelMenuIsOpen) - { - if (openedLevel.fixedLoadout.Count > 0) - { - PerkManager.instance.CurrentlyEquipped.Clear(); - PerkManager.instance.CurrentlyEquipped.AddRange(openedLevel.fixedLoadout); - } - SceneTransitionManager.instance.TransitionFromLevelSelectToLevel(openedLevel.sceneName); - } - } -} |
