Commit 36df2da9 authored by Rugeon's avatar Rugeon
Browse files

Removed some repetitive code for moving backwards/forwards

parent 790a0745
......@@ -153,16 +153,10 @@ namespace Complete
new Sequence(
new Wait(0.1f),
new Action(() => Move(0.8f)))
),
new BlackboardCondition("targetInFront",
Operator.IS_EQUAL, false,
Stops.IMMEDIATE_RESTART,
// Go backwards if the target is behind
new Sequence(
),
//Go backwards if the target is not in front
new Wait(0.1f),
new Action(() => Move(-0.8f)))
)
new Action(() => Move(-0.8f))
),
......@@ -240,15 +234,9 @@ namespace Complete
new Wait(0.1f),
new Action(() => Move(0.8f)))
),
new BlackboardCondition("targetInFront",
Operator.IS_EQUAL, false,
Stops.IMMEDIATE_RESTART,
// Go backwards if the target is behind
new Sequence(
//Go backwards if the target is not in front
new Wait(0.1f),
new Action(() => Move(-0.8f)))
)
new Action(() => Move(-0.8f))
),
......@@ -300,15 +288,11 @@ namespace Complete
new Wait(0.1f),
new Action(() => Move(0.8f)))
),
new BlackboardCondition("targetInFront",
Operator.IS_EQUAL, true,
Stops.IMMEDIATE_RESTART,
// Go backwards if the target is in front
new Sequence(
new Wait(0.1f),
new Action(() => Move(-0.8f)))
)
new Action(() => Move(-0.8f))
)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment