public bool TryStartBoosting(GroundingModule groundingModule, Rigidbody rb, float startSpeed, Vector3 heading) { if (!boostActive && groundingModule.grounded) { StartBoosting(rb, startSpeed, heading); return(true); } return(false); }
public bool TryStartDrifting(GroundingModule groundingModule, float h) { if (!m_DriftActive && (h < -0.001 || h > 0.001) && groundingModule.grounded) { StartDrifting(h); return(true); } return(false); }
private void Awake() { m_GroundingModule = GetComponent <GroundingModule>(); _heading = Vector3.forward; m_TopSpeedModule.Setup(m_BoostingModule, m_DriftingModule.driftBoost, m_DraftingModule, m_TerrainModule); m_BoostingModule.Awake(); m_DriftingModule.Awake(); m_BoostResources.Awake(); m_DrivingAudio.Start(m_TopSpeedModule.baseTopSpeed); }
private void Start() { m_GroundingModule = GetComponent <GroundingModule>(); }