public override void UpdateInstruction() { if (robot.CompareItem(compareDirection, comparison, true, -1, -1)) { // Comparison was successful instructionExecutor.JumpToInstruction(trueTarget); } // Comparison failed instructionExecutor.ExecuteNextInstruction(); }
public override void UpdateInstruction() { if (executeNext) { instructionExecutor.ExecuteNextInstruction(); } else { if (Math.Abs(robot.GetComponent <IsoTransform>().Position.x - targetPos.x) < .01f && Math.Abs(robot.GetComponent <IsoTransform>().Position.y - targetPos.y) < .01f) { executeNext = true; } } }
public override void UpdateInstruction() { if (executeNext) { instructionExecutor.ExecuteNextInstruction(); } else { // Check robot is has reached it's destination if (robot.GetComponent <IsoTransform>().Position == targetPos) { executeNext = true; } } }
public override void UpdateInstruction() { if (moving) { t += Time.deltaTime / seconds; target.transform.position = Vector3.Lerp(start, end, t); if (t >= 1) { moving = false; instructionExecutor.ExecuteNextInstruction(); } } }
public override void UpdateInstruction() { instructionExecutor.ExecuteNextInstruction(); }
public override void UpdateInstruction() { // Don't do anything, only a placeholder to jump to instructionExecutor.ExecuteNextInstruction(); }
public override void UpdateInstruction() { // Jump to new position instructionExecutor.JumpToInstruction(jumpTarget); instructionExecutor.ExecuteNextInstruction(); }