Commit e20fbd44 authored by Isa's avatar Isa

HUD + Pausenmenü fix

parent 333dc944
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
fileFormatVersion: 2
guid: b7bf4d880d42d444f8da98c29b8ee5ec
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -1494,129 +1494,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &641165127
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8474030530107407617, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_Name
value: Minimap
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_RootOrder
value: 21
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8474030530107407621, guid: d15c6360ddc5f6d45994b7a8ad351996,
type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 574052652, guid: d15c6360ddc5f6d45994b7a8ad351996, type: 3}
propertyPath: player
value:
objectReference: {fileID: 435083157}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d15c6360ddc5f6d45994b7a8ad351996, type: 3}
--- !u!1001 &674588446
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -2749,6 +2626,11 @@ PrefabInstance:
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2362585430913481208, guid: 35f9d08058ae666458aadeaeab77cf00,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 35f9d08058ae666458aadeaeab77cf00, type: 3}
--- !u!1001 &1020248502
......@@ -2801,7 +2683,7 @@ PrefabInstance:
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
propertyPath: m_RootOrder
value: 22
value: 21
objectReference: {fileID: 0}
- target: {fileID: 2888112478438871478, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
......@@ -2868,6 +2750,11 @@ PrefabInstance:
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2362585432661986845, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 50a0ddec8ac259c46a58a6b5324a759d, type: 3}
--- !u!1 &1025537126
......
This diff is collapsed.
fileFormatVersion: 2
guid: ce014a08630f7db4e8960e2e3e639b42
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,7 +15,6 @@ public class MainMenu : MonoBehaviour
private Button _selectedBtn;
private GameObject _old, _new;
void Start()
{
......
......@@ -8,16 +8,16 @@ using LevelauswahlScript;
public class PauseMenu : MonoBehaviour
{
public GameObject pauseMenu, optionsMenu;
private EventSystem _myEventSystem;
public GameObject pauseMenu;
public EventSystem _myEventSystem;
public Button firstSelect;
private GameObject _backScreen, _currentScreen;
private bool isPaused = false;
private GameObject _old, _new;
public GameObject HUD;
// Start is called before the first frame update
void Start()
{
_myEventSystem = EventSystem.current;
}
IEnumerator highlightBtn()
......@@ -36,61 +36,39 @@ public class PauseMenu : MonoBehaviour
{
_old = _new;
}
if(Input.GetButtonDown ("Cancel") && isPaused == true && _backScreen == null)
if(Input.GetButtonDown ("Cancel") && isPaused == true)
{
Resume();
} else if (Input.GetButtonDown ("Cancel") && isPaused == false && _backScreen == null && Levelauswahl.la.auswahlIsActive() == false)
} else if (Input.GetButtonDown ("Cancel") && isPaused == false && Levelauswahl.la.auswahlIsActive() == false)
{
Pause();
}
else if (Input.GetButtonDown ("Cancel") && isPaused == true && _backScreen != null)
{
_backScreen.SetActive(true);
_currentScreen.SetActive(false);
//firstSelect.Select();
_backScreen = null;
}
if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject())
if (Input.GetMouseButtonDown(0))
{
_myEventSystem.SetSelectedGameObject(_old);
}
}
public void SetBackScreen(GameObject bScreen)
{
_backScreen = bScreen;
}
public void ResetBackScreen()
{
_backScreen = null;
}
public void selectBtn(Button optionBtn)
{
optionBtn.Select();
}
public void SetCurrentScreen(GameObject cScreen)
{
_currentScreen = cScreen;
}
public void Resume()
{
isPaused = false;
pauseMenu.SetActive(false);
optionsMenu.SetActive(false);
Time.timeScale = 1f;
HUD.SetActive(true);
}
public void Pause()
{
Time.timeScale = 0f;
isPaused = true;
pauseMenu.SetActive(true);
Time.timeScale = 0f;
StartCoroutine("highlightBtn");
HUD.SetActive(false);
}
public void SwitchToMouse()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment