Verlieren und Gewinnen Screen
This commit is contained in:
parent
defd359852
commit
9e59e1980c
|
@ -6,7 +6,7 @@ TextureImporter:
|
|||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
|
@ -37,24 +37,24 @@ TextureImporter:
|
|||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 1000
|
||||
spriteBorder: {x: 300, y: 300, z: 300, w: 300}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
|
@ -112,8 +112,8 @@ TextureImporter:
|
|||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
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)
|
||||
{
|
||||
if (endGameCondition.IsWin())
|
||||
{
|
||||
Debug.Log("You won!");
|
||||
_won = true;
|
||||
}
|
||||
else if (endGameCondition.IsLose())
|
||||
{
|
||||
Debug.Log("You lost!");
|
||||
_lost = true;
|
||||
}
|
||||
|
||||
Debug.Log(endGameCondition.GetEndGameMessage());
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using Interaction;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
@ -38,11 +39,17 @@ public class UiController : MonoBehaviour
|
|||
|
||||
[SerializeField] private Gradient _deadlineTextColors;
|
||||
|
||||
public GameObject WinScreen;
|
||||
public GameObject LoseScreen;
|
||||
|
||||
void Update()
|
||||
{
|
||||
UpdateActionDisplay();
|
||||
UpdateProgressBar();
|
||||
UpdateDeadlineDateStuffTexts();
|
||||
|
||||
WinScreen.SetActive(GameManager.Instance.Won);
|
||||
LoseScreen.SetActive(GameManager.Instance.Lost);
|
||||
}
|
||||
|
||||
private void UpdateProgressBar()
|
||||
|
@ -97,4 +104,16 @@ public class UiController : MonoBehaviour
|
|||
//_prevActionButton.interactable = _pickupper.CanSelectPrevious;
|
||||
//_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