小地图进度微调,人物脚本调整
This commit is contained in:
1 parent
8ca32cd1ae
commit
2b4b2c4f70
15 files changed
+3626
-3085
No files matched your search
@@ -16,22 +16,31 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
currentlatlong = mainController.GetCenterCoordinate();
|
||||
_playerController = FindObjectOfType<PlayerController>();
|
||||
var cuurentLocalPos = map.GeoToWorldPosition(currentlatlong);
|
||||
cuurentLocalPos.y += transform.localScale.y;
|
||||
transform.localPosition = cuurentLocalPos;
|
||||
}
|
||||
protected override bool GetStart()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Compute()
|
||||
{
|
||||
Debug.Log("31" + totalDistance.ToString());
|
||||
currentlatlong = mainController.Along(totalDistance);//下一个坐标
|
||||
}
|
||||
|
||||
public void SetDistance(double _distance)
|
||||
{
|
||||
distance = _distance;
|
||||
}
|
||||
|
||||
public void SetTotalDistance(double _totalDistance)
|
||||
public void SetTotalDistance(double _totalDistance, double _distance)
|
||||
{
|
||||
Debug.Log("41" + _totalDistance.ToString());
|
||||
totalDistance = _totalDistance;
|
||||
distance = _distance;
|
||||
}
|
||||
private string headUrl;
|
||||
public void SetHead(string url )
|
||||
@@ -56,5 +65,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
headPanel.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
|
||||
}
|
||||
|
||||
public void RemoveSelf()
|
||||
{
|
||||
transform.gameObject.Destroy();
|
||||
headPanel.Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user