добавленно меню и проверки на null

This commit is contained in:
Vladislav Likhenko 2024-09-13 21:30:28 +03:00
parent 04289c7711
commit 6f64065e7d
12 changed files with 15 additions and 5 deletions

View File

@ -63,7 +63,7 @@ public class Starter : MonoBehaviour
DontMovePlayer[1].DeactivateInput();
}
if (_MinimapStatrScript.Length != 0)
if (_MinimapStatrScript != null)
{
if (_MinimapStatrScript.Length == 1)
{

View File

@ -30,16 +30,19 @@ public class DriftScore : MonoBehaviour
private IEnumerator stopDriftingCoroutine = null;
public void Starter()
public void Start()
{
driftingObject.SetActive(false);
}
private void Update()
{
if (playerRB != null)
{
ManagerDrift();
ManageUI();
}
}
void ManagerDrift()
{
speed = playerRB.velocity.magnitude;

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0cd8157dcfbd7ea4686914e88dd0c837
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,6 +5,7 @@ public class BackToMenuScript : MonoBehaviour
{
public void BackToMenu()
{
Time.timeScale = 1.0f;
SceneManager.LoadSceneAsync(0);
}
}

View File

@ -47,7 +47,6 @@ public class SelectCarGameScript : MonoBehaviour
_DriftScore.playerRB = _CurrentCar.GetComponent<Rigidbody>();
_DriftScore.Starter();
//Debug.Log("Äđčôň óęŕçŕí");
_CurrentCar.SetActive(true);