public void setTransportTarget(TransporterBehaviour transport) { if (transport == null) { destination = transform.position; setRingFormation(); } else { transporter = transport; destination = transporter.getRallyPoint(); men.ForEach(x => x.fixFormationOffset(transform.position)); men.ForEach(x => x.setDestination(destination)); //gotDestination = false; behaviour = InfantryBehaviourState.WalkToTransport; } }
public void setTransportTarget(TransporterBehaviour transport) { if (transport == null) { Pathfinder.SetPath(Pathfinder.NoPosition, MoveCommandType.Fast); setRingFormation(); } else { transporter = transport; Pathfinder.SetPath(transporter.getRallyPoint(), MoveCommandType.Fast); men.ForEach(x => x.fixFormationOffset(transform.position)); men.ForEach(x => x.setDestination(Pathfinder.GetDestination())); //gotDestination = false; behaviour = InfantryBehaviourState.WalkToTransport; } }