Пример #1
0
        public MotorController(IMotorDriver motorDriver)
        {
            _motorDriver = motorDriver;

            _stopSwitches = new List <IStopSwitch>();

            _currentDirection = Direction.RIGHT;
        }
Пример #2
0
        public MotorController(IMotorDriver motorDriver)
        {
            _motorDriver = motorDriver;

            _stopSwitches = new List<IStopSwitch>();

            _currentDirection = Direction.RIGHT;
        }
Пример #3
0
 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;
     }
 }