Commit 396b1e91 authored by HavocDeadeye's avatar HavocDeadeye
Browse files

Merge remote-tracking branch 'origin/master'

parents 26135664 56635e6e
This diff is collapsed.
fileFormatVersion: 2
guid: 59db9b8091e198d47964cc1feb902269
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: ec3d5740bb274444595fc2cc83d31799
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -689,6 +689,11 @@ MonoBehaviour:
type: 3}
optionUI: {fileID: 1344796523}
creditUI: {fileID: 365082639}
newGameText: {fileID: 1142620923}
continueGameText: {fileID: 1993474470}
optionText: {fileID: 1248125270}
creditText: {fileID: 367998310}
returnText: {fileID: 2014128178}
--- !u!114 &434523903
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2594,7 +2599,8 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_text: Menschen!
m_text: "Artist:\t\tSophie\nLevel Design:\tPhil\nLogic:\t\tFreddy, \n\t\tMarcel,
Jan\nInput:\t\tLena"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2}
m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2}
......@@ -2671,11 +2677,11 @@ MonoBehaviour:
lineCount: 1
pageCount: 1
materialCount: 1
m_havePropertiesChanged: 0
m_havePropertiesChanged: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 0
m_isInputParsingRequired: 1
m_inputSource: 0
m_hasFontAssetChanged: 0
m_subTextObjects:
......
......@@ -13,7 +13,9 @@ public class GameManager : MonoBehaviour
public int level = 1;
public int leben = 3;
public int maxLemminge = 10;
public int currentLemmings = 10;
public int lemminge = 10;
public bool existSingleLemming = false;
public Dictionary<string, bool> UnlockedAbilities { get; private set; }
......@@ -44,6 +46,36 @@ public class GameManager : MonoBehaviour
maxLevelLemming = 10;
}
//because when you start a NewGame the UI would be active before you are in a Level Scene!
public void Update()
{
if (SceneManager.GetActiveScene().name.Equals("Level " + level))
EnableIngameUI(true);
else
EnableIngameUI(false);
}
public void LoadNextLevel()
{
if (level < 4)
level++;
switch (level)
{
case 1: maxLemminge = 10;
break;
case 2: maxLemminge = 7;
break;
case 3: maxLemminge = 6;
break;
case 4: maxLemminge = 6;
break;
default:
break;
}
SceneManager.LoadScene("Level " + level, LoadSceneMode.Single);
}
public void EnableIngameUI(bool enable)
{
transform.GetChild(0).gameObject.SetActive(enable);
......
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
......@@ -11,6 +11,14 @@ public class MenuController : MonoBehaviour
[SerializeField] private GameObject optionUI;
[SerializeField] private GameObject creditUI;
public TextMeshProUGUI newGameText;
public TextMeshProUGUI continueGameText;
public TextMeshProUGUI optionText;
public TextMeshProUGUI creditText;
public TextMeshProUGUI returnText;
private GameManager gm;
private GameObject menuUI;
......@@ -36,46 +44,64 @@ public class MenuController : MonoBehaviour
optionUI.SetActive(false);
creditUI.SetActive(false);
gm.EnableIngameUI(false);
// gm.EnableIngameUI(false);
}
public void NewGameButton_Click()
{
gm.ResetProgress();
newGameText.color = new Color32(255, 255, 255, 255);
newGameText.text = "New Game";
gm.ResetProgress();
SceneManager.LoadScene("Level 1", LoadSceneMode.Single);
gm.EnableIngameUI(true);
//gm.EnableIngameUI(true);
}
public void ContinueGame_Click()
{
SceneManager.LoadScene("Level " + gm.level, LoadSceneMode.Single);
continueGameText.text = "Continue";
SceneManager.LoadScene("Level " + gm.level, LoadSceneMode.Single);
gm.EnableIngameUI(true);
// gm.EnableIngameUI(true);
}
public void Option_Click()
{
optionText.text = "Options";
optionUI.SetActive(true);
menuUI.SetActive(false);
}
public void Credit_Click()
{
creditUI.SetActive(true);
creditText.text = "Menschen!";
creditUI.SetActive(true);
menuUI.SetActive(false);
}
public void Return_MainMenu()
{
optionUI.SetActive(false);
returnText.text = "Return";
newGameText.text = "Neues Spiel";
continueGameText.text = "Fortsetzen";
optionText.text = "Optionen/Steuerung";
creditText.text = "Credits";
optionUI.SetActive(false);
creditUI.SetActive(false);;
menuUI.SetActive(true);
}
public void OnButtonPressed(int index)
{
TextMeshProUGUI text = transform.GetChild(index).GetComponent<TextMeshProUGUI>();
TextMeshProUGUI text = transform.GetChild(index).GetChild(0).GetComponent<TextMeshProUGUI>();
text.color = Color.white;
}
}
Supports Markdown
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