public void SeekNextPlaque() { CurrentStatus = Status.SeekingPlaque; currentPlaqueInd = (currentPlaqueInd + 1) % gameManager.Plaques.Length; CurrentPlaque = gameManager.Plaques[currentPlaqueInd]; DestinationCell = CurrentPlaque.GetTargetCell(); }
public void SeekPlaque() { var prof = GetMemorizedProfessor(CurrentProfName); if (prof != null) { CurrentProf = prof; SeekProf(); return; } CurrentStatus = Status.SeekingPlaque; if (student.path.Count == 0) { var currentCell = gameManager.Grid.WorldPointToCell(student.transform.position.x, student.transform.position.z); currentPlaqueInd = student.getNearestPlaqueIndex(currentCell); } else { currentPlaqueInd = student.getNearestPlaqueIndex(student.path[student.path.Count - 1].cell); } CurrentPlaque = gameManager.Plaques[currentPlaqueInd]; DestinationCell = CurrentPlaque.GetTargetCell(); }