добавленно меню и проверки на null
This commit is contained in:
parent
04289c7711
commit
6f64065e7d
@ -63,7 +63,7 @@ public class Starter : MonoBehaviour
|
|||||||
DontMovePlayer[1].DeactivateInput();
|
DontMovePlayer[1].DeactivateInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_MinimapStatrScript.Length != 0)
|
if (_MinimapStatrScript != null)
|
||||||
{
|
{
|
||||||
if (_MinimapStatrScript.Length == 1)
|
if (_MinimapStatrScript.Length == 1)
|
||||||
{
|
{
|
||||||
|
@ -30,16 +30,19 @@ public class DriftScore : MonoBehaviour
|
|||||||
|
|
||||||
private IEnumerator stopDriftingCoroutine = null;
|
private IEnumerator stopDriftingCoroutine = null;
|
||||||
|
|
||||||
public void Starter()
|
public void Start()
|
||||||
{
|
{
|
||||||
driftingObject.SetActive(false);
|
driftingObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
{
|
||||||
|
if (playerRB != null)
|
||||||
{
|
{
|
||||||
ManagerDrift();
|
ManagerDrift();
|
||||||
ManageUI();
|
ManageUI();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void ManagerDrift()
|
void ManagerDrift()
|
||||||
{
|
{
|
||||||
speed = playerRB.velocity.magnitude;
|
speed = playerRB.velocity.magnitude;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0cd8157dcfbd7ea4686914e88dd0c837
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -5,6 +5,7 @@ public class BackToMenuScript : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public void BackToMenu()
|
public void BackToMenu()
|
||||||
{
|
{
|
||||||
|
Time.timeScale = 1.0f;
|
||||||
SceneManager.LoadSceneAsync(0);
|
SceneManager.LoadSceneAsync(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ public class SelectCarGameScript : MonoBehaviour
|
|||||||
|
|
||||||
|
|
||||||
_DriftScore.playerRB = _CurrentCar.GetComponent<Rigidbody>();
|
_DriftScore.playerRB = _CurrentCar.GetComponent<Rigidbody>();
|
||||||
_DriftScore.Starter();
|
|
||||||
//Debug.Log("Äđčôň óęŕçŕí");
|
//Debug.Log("Äđčôň óęŕçŕí");
|
||||||
|
|
||||||
_CurrentCar.SetActive(true);
|
_CurrentCar.SetActive(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user