38 lines
997 B
C#
38 lines
997 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.EventSystems;
|
|
using TMPro;
|
|
public class SceneDataHolder : MonoBehaviour
|
|
{
|
|
public Transform trailCollidersParent;
|
|
public GameObject deadScreen;
|
|
public EventTrigger boostBtn;
|
|
public TMP_Text timerTxt;
|
|
void Awake()
|
|
{
|
|
SceneData.holder = this;
|
|
}
|
|
|
|
public void OnBoostUp(){
|
|
SceneData.OnBoostUp.Invoke();
|
|
}
|
|
public void OnBoostDown(){
|
|
SceneData.OnBoostDown.Invoke();
|
|
}
|
|
}
|
|
|
|
|
|
public static class SceneData{
|
|
public static GameObject localPlayer;
|
|
public static SceneDataHolder holder;
|
|
public static MinigameManager GameManager;
|
|
public static UnityEvent OnBoostDown = new UnityEvent();
|
|
public static UnityEvent OnBoostUp = new UnityEvent();
|
|
|
|
public static void SetTimerTxt(double seconds){
|
|
int secs = ((int)(seconds % 60));
|
|
int mins = Mathf.FloorToInt((float)(seconds/60));
|
|
}
|
|
} |