using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.SocialPlatforms.Impl; using UnityEngine.UI; using UnityEngine.Localization.Settings; using UnityEngine.PlayerLoop; public class DemoTitleScreen : MonoBehaviour { GameManager gm; public GameObject playFrameStandard; public GameObject playFrameDemo; public GameObject socialButtonsSteam; public GameObject socialButtonsDRMFree; public GameObject[] buttonsUnlockedByDemoVisit; public GameObject lockedByDemoVisitText; public TMP_Text callToActionText; // Positioning public GameObject bouncyLogo; public Transform topLeftBounds; float steamCallToActionSwitchTime = 10f; float lastCallToActionSwitch = 0f; // Start is called before the first frame update void Start() { gm = GameObject.FindGameObjectWithTag("GameController").GetComponent(); if (ScoreKeeper.versionIsDRMFree) { socialButtonsDRMFree.SetActive(true); socialButtonsSteam.SetActive(false); } else { socialButtonsDRMFree.SetActive(false); socialButtonsSteam.SetActive(true); } if (!ScoreKeeper.versionIsDemo) //ScoreKeeper.versionType == ScoreKeeper.VersionType.standard || ScoreKeeper.versionType == ScoreKeeper.VersionType.beta) { playFrameStandard.SetActive(true); playFrameDemo.SetActive(false); } else // if (ScoreKeeper.versionType == ScoreKeeper.VersionType.demoOnline || ScoreKeeper.versionType == ScoreKeeper.VersionType.demoSteam) { playFrameStandard.SetActive(false); playFrameDemo.SetActive(true); // Disable variant modes until player clicks on the steam page if (PlayerPrefs.GetInt("DemoVisit", 0) == 0 && (ScoreKeeper.versionIsDRMFree && ScoreKeeper.versionIsDemo))// ScoreKeeper.versionType == ScoreKeeper.VersionType.demoOnline) { lockedByDemoVisitText.SetActive(true); foreach (GameObject button in buttonsUnlockedByDemoVisit) { button.GetComponent