private void OnSensorInput() { Vector3D translation = _sensor.Translation; AngleAxis angleAxis = _sensor.Rotation; Movment movment = GetMovment(translation, angleAxis); MovmentEventBodyArg movmentEventBodyArg = new MovmentEventBodyArg(movment); InvokeMovmentInput(movmentEventBodyArg); }
//[Test] //public void CanGetForvardCommand() //{ // IInputDeviceBody inputDevice = new FakeInputDeviceBody(); // inputDevice.MovmentInput += OnMovmentInput; // Movment movment = new Movment(); // ((FakeInputDeviceBody)inputDevice).RaseMovmentEvent(movment); // // Assert.That(); //} private void OnMovmentInput(object sender, MovmentEventBodyArg e) { }
private void InvokeMovmentInput(MovmentEventBodyArg e) { EventHandler<MovmentEventBodyArg> input = MovmentInput; if (input != null) input(this, e); }
public void RaseMovmentEvent(Movment movment) { MovmentEventBodyArg movmentEventBodyArg = new MovmentEventBodyArg(movment); }