RA Harvester docking sequence.

This commit is contained in:
Paul Chote
2011-01-04 14:19:50 +13:00
parent 76216b8dd9
commit ece50b0d57
8 changed files with 176 additions and 90 deletions

View File

@@ -24,6 +24,7 @@ namespace OpenRA.Mods.Cnc
enum State
{
Wait,
Turn,
Dragin,
Dock,
Loop,
@@ -41,7 +42,7 @@ namespace OpenRA.Mods.Cnc
public HarvesterDockSequence(Actor self, Actor proc)
{
this.proc = proc;
state = State.Dragin;
state = State.Turn;
harv = self.Trait<Harvester>();
rb = proc.Trait<RenderBuilding>();
startDock = self.Trait<IHasLocation>().PxPosition;
@@ -56,6 +57,9 @@ namespace OpenRA.Mods.Cnc
{
case State.Wait:
return this;
case State.Turn:
state = State.Dragin;
return Util.SequenceActivities(new Turn(112), this);
case State.Dragin:
state = State.Dock;
return Util.SequenceActivities(new Drag(startDock, endDock, 12), this);