示例#1
0
        public Task <GetPositionOutputDTO> GetPositionQueryAsync(byte[] vehicleId, BigInteger time, BlockParameter blockParameter = null)
        {
            var getPositionFunction = new GetPositionFunction();

            getPositionFunction.VehicleId = vehicleId;
            getPositionFunction.Time      = time;

            return(ContractHandler.QueryDeserializingToObjectAsync <GetPositionFunction, GetPositionOutputDTO>(getPositionFunction, blockParameter));
        }
示例#2
0
 public BasicVehicle(GetPositionFunction getPositionFunction, GetRotationFunction getRotationFunction, MoveToPositionFunction moveToPositionFunction, JumpFunction jumpFunction, ObjectManager objectManager, float maxSteering, float maxVelocity, float maxAcceleration)
 {
     Velocity        = new Vector3(0, 0, 0);
     MaxSteering     = maxSteering;
     MaxVelocity     = maxVelocity;
     MaxAcceleration = maxAcceleration;
     GetRotation     = getRotationFunction;
     GetPosition     = getPositionFunction;
     MoveToPosition  = moveToPositionFunction;
     ObjectManager   = objectManager;
     Jump            = jumpFunction;
 }
示例#3
0
        public SmartMovementEngine(GetPositionFunction getPositionFunction, GetRotationFunction getRotationFunction, MoveToPositionFunction moveToPositionFunction, GeneratePathFunction generatePathFunction, JumpFunction jumpFunction, ObjectManager objectManager, MovementSettings movementSettings)
        {
            State            = MovementEngineState.None;
            GetPosition      = getPositionFunction;
            GetRotation      = getRotationFunction;
            MoveToPosition   = moveToPositionFunction;
            GeneratePath     = generatePathFunction;
            MovementSettings = movementSettings;
            ObjectManager    = objectManager;
            Jump             = jumpFunction;

            PlayerVehicle = new BasicVehicle(getPositionFunction, getRotationFunction, moveToPositionFunction, jumpFunction, objectManager, movementSettings.MaxSteering, movementSettings.MaxVelocity, movementSettings.MaxAcceleration);
        }
示例#4
0
 public Task <GetPositionOutputDTO> GetPositionQueryAsync(GetPositionFunction getPositionFunction, BlockParameter blockParameter = null)
 {
     return(ContractHandler.QueryDeserializingToObjectAsync <GetPositionFunction, GetPositionOutputDTO>(getPositionFunction, blockParameter));
 }