public MotorController(IMotorDriver motorDriver) { _motorDriver = motorDriver; _stopSwitches = new List <IStopSwitch>(); _currentDirection = Direction.RIGHT; }
public MotorController(IMotorDriver motorDriver) { _motorDriver = motorDriver; _stopSwitches = new List<IStopSwitch>(); _currentDirection = Direction.RIGHT; }
void Start() { switch (mdType){ default: case MotorDriverTypes.UserInputMD: motorDriver = new UserInputMotorDriver(); break; case MotorDriverTypes.RandomMD: motorDriver = new RandomMotorDriver(); break; case MotorDriverTypes.WalkerMD: motorDriver = new WalkerMotorDriver(); motorDriver.init(go); break; } }