final commit

This commit is contained in:
2022-04-29 21:55:55 +07:00
parent 4172fc94ba
commit e90826e5bb
10 changed files with 247 additions and 20 deletions

View File

@ -16,13 +16,13 @@ public class MovementController : MonoBehaviour
public void MoveToRandomPoint()
{
Debug.Log(MapManager.navPoints == null);
goToNextNavPoint(MapManager.navPoints[Random.Range(0, MapManager.navPoints.Count)]);
Debug.Log(MapManager.NavPoints == null);
goToNextNavPoint(MapManager.NavPoints[Random.Range(0, MapManager.NavPoints.Count)]);
}
public List<NavPoint> getPointsCandidate()
{
return MapManager.navPoints
return MapManager.NavPoints
.Where(point => (currentPosition.position - point.position).magnitude <= SettingsReader.Instance.GetSettings.movementSpeed)
.ToList();
}