Little fix + added time uipopup

This commit is contained in:
Rabidus 2023-08-22 17:17:54 +03:00
parent 48552dfcb6
commit 23d062ee70
6 changed files with 5364 additions and 1036 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[CreateAssetMenu(fileName = "Monumet")] [CreateAssetMenu(fileName = "Monumet")]
[System.Serializable]
public class MonumentInfo : ScriptableObject public class MonumentInfo : ScriptableObject
{ {
public string Name; public string Name;

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,13 @@ public class vTimerCounter : MonoBehaviour, ITextChangable
public UnityEvent OnTimeEnded; public UnityEvent OnTimeEnded;
private UIPopupController _UIPopupController;
private void Awake()
{
_UIPopupController = FindObjectOfType<UIPopupController>();
}
public int Seconds; public int Seconds;
public void Start() public void Start()
{ {
@ -34,6 +41,8 @@ public class vTimerCounter : MonoBehaviour, ITextChangable
if (!started) if (!started)
return; return;
_UIPopupController.SpawnPopup(seconds.ToString(), UIMagnetType.Time);
StartTime = StartTime.AddSeconds(seconds); StartTime = StartTime.AddSeconds(seconds);
} }

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ public class UIPopupController : MonoBehaviour
[SerializeField] [SerializeField]
private List<UIPopupPair> _UIPairs = new List<UIPopupPair>(); private List<UIPopupPair> _UIPairs = new List<UIPopupPair>();
public void SpawnPopup(string message, UIMagnetType type, Action onComplete) public void SpawnPopup(string message, UIMagnetType type, Action onComplete = null)
{ {
var selectedPair = _UIPairs.Find(x => x.UIMagnetType == type); var selectedPair = _UIPairs.Find(x => x.UIMagnetType == type);

View File

@ -155,8 +155,6 @@ PlayerSettings:
- {fileID: 0} - {fileID: 0}
- {fileID: 0} - {fileID: 0}
- {fileID: 0} - {fileID: 0}
- {fileID: -6517218471499782410, guid: 1a4c68ca72a83449f938d669337cb305, type: 2}
- {fileID: 648089955447955448, guid: ac7df53da7627c941aa8b5303dd3d14f, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1