summaryrefslogtreecommitdiff
path: root/Thronefall_1_0/Decompile/LevelSelectManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_1_0/Decompile/LevelSelectManager.cs')
-rw-r--r--Thronefall_1_0/Decompile/LevelSelectManager.cs114
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);
- }
- }
-}