浏览代码

Fix a couple NPEs in Boat.cs

/2019.3-marc
Marc Tanenbaum 5 年前
当前提交
697cfa42
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      Assets/Scripts/Boat/Boat.cs

4
Assets/Scripts/Boat/Boat.cs


private void FixedUpdate()
{
if (WaypointGroup.Instance == null)
return;
if (!RaceManager.RaceStarted)
{
// race not started, make sure to keep boat fairly aligned.

private void UpdateLaps()
{
if (WaypointGroup.Instance == null)
return;
LapPercentage = WaypointGroup.Instance.GetPercentageAroundTrack(transform.position);
var lowPercentage = _lastCheckpoint?.normalizedDistance ?? 0f;
var highPercentage = _nextCheckpoint?.normalizedDistance ?? 1f;

正在加载...
取消
保存