сейв
This commit is contained in:
parent
cba6df902a
commit
04289c7711
@ -7,9 +7,12 @@ public class MinimapStatrScript : MonoBehaviour
|
||||
|
||||
[SerializeField] private SelectCarGameScript _SelectCarGameScript;
|
||||
|
||||
private void Start()
|
||||
public void Starter()
|
||||
{
|
||||
_followTarget.target = _SelectCarGameScript._CurrentCar.transform;
|
||||
_followYRotation.target = _SelectCarGameScript._CurrentCar.transform;
|
||||
if (_SelectCarGameScript._CurrentCar != null)
|
||||
{
|
||||
_followTarget.target = _SelectCarGameScript._CurrentCar.transform;
|
||||
_followYRotation.target = _SelectCarGameScript._CurrentCar.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ public class FollowTarget : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
transform.position = target.transform.position + offset;
|
||||
if(target != null) transform.position = target.transform.position + offset;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,6 @@ public class FollowYRotation : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
transform.eulerAngles = new Vector3(0 ,target.eulerAngles.y, 0);
|
||||
if (target != null) transform.eulerAngles = new Vector3(0 ,target.eulerAngles.y, 0);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class Starter : MonoBehaviour
|
||||
|
||||
[SerializeField] private Image _borders;
|
||||
|
||||
|
||||
[SerializeField] private MinimapStatrScript[] _MinimapStatrScript;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@ -63,6 +63,19 @@ public class Starter : MonoBehaviour
|
||||
DontMovePlayer[1].DeactivateInput();
|
||||
}
|
||||
|
||||
if (_MinimapStatrScript.Length != 0)
|
||||
{
|
||||
if (_MinimapStatrScript.Length == 1)
|
||||
{
|
||||
_MinimapStatrScript[0].Starter();
|
||||
}
|
||||
else if (_MinimapStatrScript.Length == 2)
|
||||
{
|
||||
_MinimapStatrScript[0].Starter();
|
||||
_MinimapStatrScript[1].Starter();
|
||||
}
|
||||
}
|
||||
|
||||
_borders.enabled = true;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class DriftScore : MonoBehaviour
|
||||
|
||||
private IEnumerator stopDriftingCoroutine = null;
|
||||
|
||||
private void Start()
|
||||
public void Starter()
|
||||
{
|
||||
driftingObject.SetActive(false);
|
||||
}
|
||||
|
Binary file not shown.
@ -46,15 +46,19 @@ public class TimerOnInactiveScript : MonoBehaviour
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
//Debug.Log("gamepad");
|
||||
}
|
||||
|
||||
if (control is AxisControl axis)
|
||||
{
|
||||
float value = axis.ReadValue();
|
||||
|
||||
if (value != 0)
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
}
|
||||
//Debug.Log($"gamepad {value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -64,7 +68,9 @@ public class TimerOnInactiveScript : MonoBehaviour
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
} }
|
||||
//Debug.Log("keyboard");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
|
@ -23,6 +23,12 @@ public class SelectCarGameScript : MonoBehaviour
|
||||
[SerializeField] private RCC_UIDashboardDisplay _RCC_UIDashboardDisplay;
|
||||
|
||||
|
||||
//[SerializeField] private FollowTarget _FollowTarget;
|
||||
|
||||
//[SerializeField] private FollowYRotation _FollowYRotation;
|
||||
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_Player -= 1;
|
||||
@ -39,7 +45,9 @@ public class SelectCarGameScript : MonoBehaviour
|
||||
_CinemachineVC.Follow = _CurrentCar.transform;
|
||||
_CinemachineVC.LookAt = _CurrentCar.transform;
|
||||
|
||||
|
||||
_DriftScore.playerRB = _CurrentCar.GetComponent<Rigidbody>();
|
||||
_DriftScore.Starter();
|
||||
//Debug.Log("Äđčôň óęŕçŕí");
|
||||
|
||||
_CurrentCar.SetActive(true);
|
||||
@ -53,6 +61,11 @@ public class SelectCarGameScript : MonoBehaviour
|
||||
_RCC_UIDashboardDisplay.vehicle = _CurrentCar.GetComponent<RCC_CarControllerV3>();
|
||||
//Debug.Log("Ęîíňđîëëĺđű óďđŕâëĺíč˙ óęŕçŕíű");
|
||||
|
||||
//if (_FollowTarget != null)
|
||||
//{
|
||||
// _FollowTarget.target = _CurrentCar.transform;
|
||||
// _FollowYRotation.target = _CurrentCar.transform;
|
||||
//}
|
||||
}
|
||||
|
||||
//private void Start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user