You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.5 KiB

  1. // Copyright (C) 2017 Google, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #if UNITY_IOS
  15. using UnityEngine;
  16. using GoogleMobileAds.Common;
  17. namespace GoogleMobileAds.iOS
  18. {
  19. public class MobileAdsClient : IMobileAdsClient
  20. {
  21. private static MobileAdsClient instance = new MobileAdsClient();
  22. private MobileAdsClient(){}
  23. public static MobileAdsClient Instance
  24. {
  25. get
  26. {
  27. return instance;
  28. }
  29. }
  30. public void Initialize(string appId)
  31. {
  32. Externs.GADUInitialize(appId);
  33. }
  34. public void SetApplicationVolume(float volume)
  35. {
  36. Externs.GADUSetApplicationVolume(volume);
  37. }
  38. public void SetApplicationMuted(bool muted)
  39. {
  40. Externs.GADUSetApplicationMuted(muted);
  41. }
  42. public void SetiOSAppPauseOnBackground(bool pause)
  43. {
  44. Externs.GADUSetiOSAppPauseOnBackground(pause);
  45. }
  46. }
  47. }
  48. #endif