예제 #1
0
 void DeleteEntityNotificationHandler(simengine.DeleteSimulationEntity del)
 {
     _entity = null;
 }
예제 #2
0
        void InsertEntityNotificationHandler(simengine.InsertSimulationEntity ins)
        {
            // TT - Unique entity class required
            // _entity = (simengine.DifferentialDriveEntity)ins.Body;
            _entity = (simengine.TTDifferentialDriveEntity)ins.Body;
            _entity.ServiceContract = Contract.Identifier;

            // create default state based on the physics entity
            if (_entity.ChassisShape != null)
                _state.DistanceBetweenWheels = _entity.ChassisShape.BoxState.Dimensions.X;

            _state.LeftWheel.MotorState.PowerScalingFactor = _entity.MotorTorqueScaling;
            _state.RightWheel.MotorState.PowerScalingFactor = _entity.MotorTorqueScaling;
        }