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)); }
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; }
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); }
public Task <GetPositionOutputDTO> GetPositionQueryAsync(GetPositionFunction getPositionFunction, BlockParameter blockParameter = null) { return(ContractHandler.QueryDeserializingToObjectAsync <GetPositionFunction, GetPositionOutputDTO>(getPositionFunction, blockParameter)); }