Verlieren und Gewinnen Screen
This commit is contained in:
parent
defd359852
commit
9e59e1980c
|
@ -6,7 +6,7 @@ TextureImporter:
|
||||||
serializedVersion: 12
|
serializedVersion: 12
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 1
|
enableMipMap: 0
|
||||||
sRGBTexture: 1
|
sRGBTexture: 1
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
|
@ -37,24 +37,24 @@ TextureImporter:
|
||||||
filterMode: 1
|
filterMode: 1
|
||||||
aniso: 1
|
aniso: 1
|
||||||
mipBias: 0
|
mipBias: 0
|
||||||
wrapU: 0
|
wrapU: 1
|
||||||
wrapV: 0
|
wrapV: 1
|
||||||
wrapW: 0
|
wrapW: 0
|
||||||
nPOTScale: 1
|
nPOTScale: 0
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
spriteMode: 0
|
spriteMode: 1
|
||||||
spriteExtrude: 1
|
spriteExtrude: 1
|
||||||
spriteMeshType: 1
|
spriteMeshType: 0
|
||||||
alignment: 0
|
alignment: 0
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 1000
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 300, y: 300, z: 300, w: 300}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 0
|
alphaIsTransparency: 1
|
||||||
spriteTessellationDetail: -1
|
spriteTessellationDetail: -1
|
||||||
textureType: 0
|
textureType: 8
|
||||||
textureShape: 1
|
textureShape: 1
|
||||||
singleChannelComponent: 0
|
singleChannelComponent: 0
|
||||||
flipbookRows: 1
|
flipbookRows: 1
|
||||||
|
@ -112,8 +112,8 @@ TextureImporter:
|
||||||
outline: []
|
outline: []
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID:
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
internalID: 0
|
internalID: 1537655665
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -153,15 +153,27 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private bool _won;
|
||||||
|
|
||||||
|
public bool Won => _won;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private bool _lost;
|
||||||
|
|
||||||
|
public bool Lost => _lost;
|
||||||
|
|
||||||
private void EndGame(EndGameCondition endGameCondition)
|
private void EndGame(EndGameCondition endGameCondition)
|
||||||
{
|
{
|
||||||
if (endGameCondition.IsWin())
|
if (endGameCondition.IsWin())
|
||||||
{
|
{
|
||||||
Debug.Log("You won!");
|
Debug.Log("You won!");
|
||||||
|
_won = true;
|
||||||
}
|
}
|
||||||
else if (endGameCondition.IsLose())
|
else if (endGameCondition.IsLose())
|
||||||
{
|
{
|
||||||
Debug.Log("You lost!");
|
Debug.Log("You lost!");
|
||||||
|
_lost = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log(endGameCondition.GetEndGameMessage());
|
Debug.Log(endGameCondition.GetEndGameMessage());
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||||
using Interaction;
|
using Interaction;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
@ -37,12 +38,18 @@ public class UiController : MonoBehaviour
|
||||||
[SerializeField] private TextMeshProUGUI _predictedEndText;
|
[SerializeField] private TextMeshProUGUI _predictedEndText;
|
||||||
|
|
||||||
[SerializeField] private Gradient _deadlineTextColors;
|
[SerializeField] private Gradient _deadlineTextColors;
|
||||||
|
|
||||||
|
public GameObject WinScreen;
|
||||||
|
public GameObject LoseScreen;
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
UpdateActionDisplay();
|
UpdateActionDisplay();
|
||||||
UpdateProgressBar();
|
UpdateProgressBar();
|
||||||
UpdateDeadlineDateStuffTexts();
|
UpdateDeadlineDateStuffTexts();
|
||||||
|
|
||||||
|
WinScreen.SetActive(GameManager.Instance.Won);
|
||||||
|
LoseScreen.SetActive(GameManager.Instance.Lost);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateProgressBar()
|
private void UpdateProgressBar()
|
||||||
|
@ -97,4 +104,16 @@ public class UiController : MonoBehaviour
|
||||||
//_prevActionButton.interactable = _pickupper.CanSelectPrevious;
|
//_prevActionButton.interactable = _pickupper.CanSelectPrevious;
|
||||||
//_nextActionButton.interactable = _pickupper.CanSelectNext;
|
//_nextActionButton.interactable = _pickupper.CanSelectNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Replay()
|
||||||
|
{
|
||||||
|
string currentSceneName = SceneManager.GetActiveScene().name;
|
||||||
|
SceneManager.LoadScene(currentSceneName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Exit()
|
||||||
|
{
|
||||||
|
UnityEditor.EditorApplication.isPlaying = false;
|
||||||
|
Application.Quit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue