late goodbye

This commit is contained in:
2022-11-14 20:02:23 +05:00
parent d540eb1e06
commit 7ba948e4af
43 changed files with 11842 additions and 145 deletions
+56 -2
View File
@@ -21,6 +21,11 @@ public class GameSystem : MonoBehaviour
public List<IGameComponent> gameComponents { get; private set; } = new List<IGameComponent>();
[SerializeField] UIMainMenu mainMenu;
[SerializeField] UICanvas trainsMenu;
[Space]
public UICanvas trainEP2D;
public UICanvas train2;
public UICanvas train3;
[Space]
[SerializeField] GameObject[] sigletonComponents;
@@ -40,8 +45,12 @@ public class GameSystem : MonoBehaviour
{
mainMenu.UpdateLocationMenu(locationsName[sceneName]);
var qrReader = FindObjectOfType<QRCodeReader>();
qrReader.camTexture.Stop();
try
{
var qrReader = FindObjectOfType<QRCodeReader>();
qrReader.camTexture.Stop();
}
catch {}
var sceneLoadingOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single);
while(!sceneLoadingOperation.isDone) await Task.Yield();
@@ -54,6 +63,51 @@ public class GameSystem : MonoBehaviour
});
}
public void ShowAboutTrain()
{
switch(mainMenu.currentTrain.type)
{
case(TrainType.EP2D):
ShowAboutEP2D();
break;
case(TrainType.Ivolga2):
ShowAboutIvolga2();
break;
case(TrainType.Ivolga3):
ShowAboutIvolga3();
break;
}
}
public void ShowAboutEP2D()
{
train2.gameObject.SetActive(false);
train3.gameObject.SetActive(false);
trainsMenu.gameObject.SetActive(true);
trainEP2D.gameObject.SetActive(true);
}
public void ShowAboutIvolga2()
{
train3.gameObject.SetActive(false);
trainEP2D.gameObject.SetActive(false);
trainsMenu.gameObject.SetActive(true);
train2.gameObject.SetActive(true);
}
public void ShowAboutIvolga3()
{
train2.gameObject.SetActive(false);
trainEP2D.gameObject.SetActive(false);
trainsMenu.gameObject.SetActive(true);
train3.gameObject.SetActive(true);
}
public void LeaveScene()
{
var sceneLoadingOperation = SceneManager.LoadSceneAsync("MainMenu",