Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskSequence #49

Merged
merged 2 commits into from May 11, 2015
Merged

TaskSequence #49

merged 2 commits into from May 11, 2015

Conversation

IncoCode
Copy link
Contributor

It seems like it's working 😄
Example:

TaskSequence s = new TaskSequence();
s.AddTask.EnterVehicle( veh, VehicleSeat.Driver );
s.AddTask.DriveTo( veh, pos, 2, 30 );
s.AddTask.LeaveVehicle();
s.CloseSequence();

ped.Task.PerformSequence( s );

@Nacorpio
Copy link
Contributor

That is a great idea.
Good job.

@crosire
Copy link
Owner

crosire commented May 10, 2015

Here's my usual suggestion again =): Make TaskSequence a value class and add "Tasks::PerformSequence", so one can do the following instead:

TaskSequence s = new TaskSequence();
s.AddTask.EnterVehicle(_veh, VehicleSeat.Driver);
s.AddTask.DriveTo(_veh, _pos, 2, 30);
s.AddTask.LeaveVehicle();

ped.Task.PerformSequence(s);

@IncoCode
Copy link
Contributor Author

👍 Okay.

@IncoCode
Copy link
Contributor Author

Updated.
P.S. TaskSequence can't be a value class. Because i need a default constructor. It's using for creating new sequence (OPEN_SEQUENCE_TASK) and creating "null ped".

@crosire crosire merged commit 6eac816 into crosire:master May 11, 2015
crosire added a commit that referenced this pull request May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants