Google.ts 385 B

12345678910111213141516
  1. import { ANDROID, IOS } from "cc/env";
  2. import { GoogleImpl } from "./GoogleImpl";
  3. import { GoogleNativeImpl } from "./GoogleNativeImpl";
  4. import { GoogleH5Impl } from "./GoogleH5Impl";
  5. function getGoogleImpl(): GoogleImpl {
  6. if (ANDROID || IOS) {
  7. return new GoogleNativeImpl();
  8. }
  9. return new GoogleH5Impl();
  10. }
  11. const google = getGoogleImpl();
  12. export default google;