daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function UnityProgress(gameInstance, progress) {
  2.   if (!gameInstance.Module)
  3.     return;
  4.   if (!gameInstance.logo) {
  5.     gameInstance.logo = document.createElement("div");
  6.     gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle;
  7.     gameInstance.container.appendChild(gameInstance.logo);
  8.   }
  9.   if (!gameInstance.progress) {    
  10.     gameInstance.progress = document.createElement("div");
  11.     gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle;
  12.     gameInstance.progress.empty = document.createElement("div");
  13.     gameInstance.progress.empty.className = "empty";
  14.     gameInstance.progress.appendChild(gameInstance.progress.empty);
  15.     gameInstance.progress.full = document.createElement("div");
  16.     gameInstance.progress.full.className = "full";
  17.     gameInstance.progress.appendChild(gameInstance.progress.full);
  18.     gameInstance.container.appendChild(gameInstance.progress);
  19.   }
  20.   gameInstance.progress.full.style.width = (100 * progress) + "%";
  21.   gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
  22.   if (progress == 1)
  23.     {
  24. gameInstance.logo.style.display = gameInstance.progress.style.display = "none";
  25. function f1(value){
  26.         console.log("f1 called");
  27.         gameInstance.SendMessage("GameObject", "ChangeOrientation", value);
  28.     }
  29. var urlParams = new URLSearchParams(window.location.search);
  30. if (urlParams.get('q') != null){
  31.     var id = urlParams.get('q').toString();
  32.     f1(id);
  33. }
  34. }
  35.  
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top