public Task ReceiveAsync(IContext context) { switch (context.Message) { case LogMessage log: { _logs.Add(log); break; } case InspectionReport report: { _state = report; break; } case TrackedMessage message: { _messages.Add(message); break; } case QueryLogsAndMessages q: { var data = new LogsAndMessagesData(); data.Messages.Add(_messages); data.Logs.Add(_logs); context.Tell(context.Sender, data); break; } } return(Actor.Done); }
// Start is called before the first frame update void Start() { csvReader = new ReadCSV(); lineLocs = new FixedLenQueue <Vector3>(maxQCap); lr = GetComponent <LineRenderer>(); csvReader.Read(fileName, out csvData, ReadCSV.FileFrom.StramingAssets); Vector3 vec = VectorForUnity(csvData.Rows[numInstantiated++]); startPosition = car.transform.position = nextPoint = vec; lineLocs.Add(vec); }
void ProcessPoint(float duration) { int prevRow = currRow - 1; if (currRow == 0) { prevRow = csvData.Rows.Count - 1; } Vector3 vec = VectorForUnity(csvData.Rows[prevRow]); lineLocs.Add(vec); vec = VectorForUnity(csvData.Rows[currRow]); SetDestination(vec, duration); }