void Start() { sceneName = SceneManager.GetActiveScene().name; tutorialObjects = GameObject.FindGameObjectsWithTag("tutorial").ToList(); foreach (GameObject obj in tutorialObjects) { obj.SetActive(false); } if (PlayerPrefs.GetInt("isTutorial") == 1) { tutorialPanel1.SetActive(true); } // Populate the add new scrollview MAS_PlayList tempMaster = (MAS_PlayList)COM_Director.GetMaster("MAS_PlayList"); controller = (CON_PlayList)tempMaster.GetController("CON_PlayList"); if (controller.CheckIfNewEntry()) { PopulateAvailableViewOnly(); } else { scramble = JsonUtility.FromJson <DO_WordScramble>(controller.GetJsonByIndex(controller.GetActiveContextIndex())); ToggleAllToggles(); PopulateBothViews(); } }
void Start() { tutorialObjects = GameObject.FindGameObjectsWithTag("tutorial").ToList(); foreach (GameObject obj in tutorialObjects) { obj.SetActive(false); } if (PlayerPrefs.GetInt("isTutorial") == 1) { tutorialPanel1.SetActive(true); tutorialButtonIconOff.SetActive(true); tutorialButtonIconOn.SetActive(false); } else { tutorialButtonIconOff.SetActive(false); tutorialButtonIconOn.SetActive(true); } MAS_Admin tempMaster = (MAS_Admin)COM_Director.GetMaster("MAS_Admin"); controller = (CON_AdminMenu)tempMaster.GetController("CON_AdminMenu"); }
// View Initialization void Start() { MAS_RewardsList master = (MAS_RewardsList)COM_Director.GetMaster("MAS_RewardsList"); if (master != null) { controller = (CON_RewardsList)master.GetController("CON_RewardsList"); if (controller != null) { if (controller.IsEditMode) { SetupSceneEdit(); } else { SetupSceneAdd(); } LoadRewardImagePreview(); } } StartCoroutine(StartWaitHelper()); }
// View Initialization void Start() { Debug.Log(CLASSNAME + "creating view"); MAS_PlayList master = (MAS_PlayList)COM_Director.GetMaster("MAS_PlayList"); if (master != null) { controller = (CON_PlayList)master.GetController("CON_PlayList"); if (controller != null) { //Start setting up scene //Request Rewards from controller RequestData(); } if (controller.CheckIfNewEntry()) { Debug.Log("New Entry"); } else { chooseRewardObj = JsonUtility.FromJson <DO_ChooseReward>(controller.GetJsonByIndex(controller.GetActiveContextIndex())); ToggleAllToggles(); } } }
void Start() { MAS_WordEditing tempMaster = (MAS_WordEditing)COM_Director.GetMaster("MAS_WordEditing"); model = (MOD_WordEditing)tempMaster.GetModel("MOD_WordEditing"); controller = (CON_WordEditing)tempMaster.GetController("CON_WordEditing"); activeButtons = 0; CleanUpScroll(); EditOrAdd(); CleanUpScroll(); DisplayGallery(); SetUpWordTags(); wordTagsOriginal = wordTags; clip = controller.GetExistingAudioClip(); sourceAudio.clip = clip; if (Microphone.devices.Length < 0) { micName = Microphone.devices[0]; } else { Debug.Log("Could not find any microphone devices"); } if (PlayerPrefs.GetInt("isTutorial") == 1) { tutorialPanel.SetActive(true); } }
// Use this for initialization void Start() { // Grab the master and the controller MAS_GameLoop tempMaster = (MAS_GameLoop)COM_Director.GetMaster("MAS_GameLoop"); controller = (CON_GameLoop)tempMaster.GetController("CON_GameLoop"); if (controller == null) { Debug.Log("LOOP: controller was NULL!!!!"); } else { Debug.Log("LOOP: controller is GOOD!"); } // Hide the empty playlist panel playlistEmptyPanel.SetActive(false); // Get the total round count for this play list totalRoundCount = controller.GetRoundCount(); playIndex = ZERO_INDEX; loopIterations = STARTING_ITERATION; passLocked = controller.IsPassLocked(); maxIterations = controller.GetIterationNumber(); customTexture1 = new Texture2D(XY_DIMENSION, XY_DIMENSION); customTexture2 = new Texture2D(XY_DIMENSION, XY_DIMENSION); customTexture3 = new Texture2D(XY_DIMENSION, XY_DIMENSION); Debug.Log(string.Format("Pass locked is {0} and loop iterations are {1} and infinite loop is {2}", passLocked, maxIterations, infiniteLoop)); Debug.Log("VW: Total round count is " + totalRoundCount.ToString()); if (totalRoundCount == 0) { playlistEmptyPanel.SetActive(true); } else if (passLocked && frontLocked) { Debug.Log("PAUSE THEN CONTINUE COROUTINE START"); StartCoroutine(PauseThenContinue()); } else { Debug.Log("UPDATING BAR"); UpdateProgressBar(0); Debug.Log("BAR UPDATED! ACTIVATING CANVASSES"); ActivateDeactivateCanvass(controller.GetPlayEntry(playIndex).type_id); } ResetRoundListCount(); UpdateProgressBar(CalculateRoundsTillReward()); Debug.Log("Game Loop View STARTED!"); }
void Start() { Debug.Log("VW: Starting the word list view!"); MAS_WordEditing tempMaster = (MAS_WordEditing)COM_Director.GetMaster("MAS_WordEditing"); model = (MOD_WordEditing)tempMaster.GetModel("MOD_WordEditing"); List <string> wordSetsList = new List <string>(); tutorialObjects = new List <GameObject>(); tutorialObjects = GameObject.FindGameObjectsWithTag("tutorial").ToList(); Debug.Log("******************************************* tutorial objects = "); foreach (GameObject obj in tutorialObjects) { Debug.Log(obj.name + " found with tutorial tag"); } controller = (CON_WordEditing)tempMaster.GetController("CON_WordEditing"); // TODO: Remove this when DomainShift functionality is in both the MasterClass and // AB_Model controller.PopulateInUseSet(); ////////////////////////////////////////////////////////////////////////////////// DisplayScrollViewWords(); StartCoroutine(CreateDLCButtons()); StartCoroutine(DownloadWordSetsList()); if (PlayerPrefs.GetInt("isTutorial") == 1) { foreach (GameObject obj in tutorialObjects) { obj.SetActive(false); } HelpButtonIconOff.SetActive(true); HelpButtonIconOn.SetActive(false); tutorialPanel1.SetActive(true); } else { foreach (GameObject obj in tutorialObjects) { obj.SetActive(false); } HelpButtonIconOff.SetActive(false); HelpButtonIconOn.SetActive(true); } }
void Start() { // Populate the add new scrollview MAS_PlayList tempMaster = (MAS_PlayList)COM_Director.GetMaster("MAS_PlayList"); controller = (CON_PlayList)tempMaster.GetController("CON_PlayList"); if (controller.CheckIfNewEntry()) { PopulateAvailableViewOnly(); } else { matchingGameDataObject = JsonUtility.FromJson <DO_MatchingGame>(controller.GetJsonByIndex(controller.GetActiveContextIndex())); ToggleAllToggles(); PopulateBothViews(); } }
void Start() { sceneName = SceneManager.GetActiveScene().name; // Populate the add new scrollview MAS_PlayList tempMaster = (MAS_PlayList)COM_Director.GetMaster("MAS_PlayList"); controller = (CON_PlayList)tempMaster.GetController("CON_PlayList"); if (controller.CheckIfNewEntry()) { PopulateAvailableViewOnly(); } else { memory = JsonUtility.FromJson <DO_MemoryCards>(controller.GetJsonByIndex(controller.GetActiveContextIndex())); ToggleAllToggles(); PopulateBothViews(); } }
// View Initialization void Start() { Debug.Log(CLASSNAME + "Starting up view"); MAS_RewardsList master = (MAS_RewardsList)COM_Director.GetMaster("MAS_RewardsList"); VerticalLayoutGroup verticalLayout = viewportContent.transform.GetComponent <VerticalLayoutGroup>(); // entrySize = g.cellSize.y + g.spacing.y; if (master != null) { controller = (CON_RewardsList)master.GetController("CON_RewardsList"); if (controller != null) { Debug.Log(CLASSNAME + "***************** CONTROLLER NOT NULL"); Dictionary <string, DO_Reward> data = controller.GetRewardsListData(); foreach (var entry in data) { AddRewardItem(entry.Value.id, entry.Value.reward_name); } AlterContentBoxSizing(currentEntries); } } }
void Start() { // Populate the add new scrollview MAS_PlayList tempMaster = (MAS_PlayList)COM_Director.GetMaster("MAS_PlayList"); controller = (CON_PlayList)tempMaster.GetController("CON_PlayList"); // set the playlist has reward bool to false before populating the scroll view. If a reward is present in the playlist it will switch this bool back to true. playlistHasReward = false; SetLoopToggleAndValues(); tutorialObjects = GameObject.FindGameObjectsWithTag("tutorial").ToList(); foreach (GameObject obj in tutorialObjects) { obj.SetActive(false); } if (PlayerPrefs.GetInt("AutoPlaylistOnOffKey") == 0) { autoPlaylistEnabledPanel.SetActive(false); SetupPlayAndAddNewLists(); } else { autoPlaylistEnabledPanel.SetActive(true); autoplaylistEnabledRewardTimeText.text = PlayerPrefs.GetString("AutoplaylistRewardTimeKey"); autoplaylistEnabledRewardsText.text = PlayerPrefs.GetString("AutoplaylistRewardsKey"); tagsText.text = PlayerPrefs.GetString("CurrentAutoplaylistTags"); gamesText.text = PlayerPrefs.GetString("CurrentAutoplaylistGames"); addButton.interactable = false; } Dictionary <int, string> wordsDatabase = new Dictionary <int, string>(controller.GetIdToWordsDict()); Dictionary <int, string> wordIdTagDict = new Dictionary <int, string>(controller.GetIdToWordTagsDict()); List <string> selectedWordTagsList = new List <string>(); Dictionary <int, int> OrderedFilteredWordIdsDict = new Dictionary <int, int>(); if (PlayerPrefs.GetInt("AutoplaylistRewardTimeIntKey") == 0) { PlayerPrefs.SetInt("AutoplaylistRewardTimeIntKey", 1); } else { rewardTime = PlayerPrefs.GetInt("AutoplaylistRewardTimeIntKey"); wordsPerReward = rewardTime; } RequestData(); if (PlayerPrefs.GetInt("isTutorial") == 1) { tutorialPanel1.SetActive(true); tutorialButtonIconOff.SetActive(true); tutorialButtonIconOn.SetActive(false); } else { tutorialButtonIconOff.SetActive(false); tutorialButtonIconOn.SetActive(true); } }
void Start() { // Preload the Masters if they are not loaded COM_Director.InitData(); MAS_Admin tempMasterAdmin = (MAS_Admin)COM_Director.GetMaster("MAS_Admin"); adminController = (CON_AdminMenu)tempMasterAdmin.GetController("CON_AdminMenu"); isLockOn = (PlayerPrefs.GetInt("lockOnOff") == 1); // Create a current time DateTime object DateTime current = DateTime.Now; // Create a DateTime object for the FROM and TO lock out times DateTime lockOutFrom = new DateTime(current.Year, current.Month, current.Day, (PlayerPrefs.GetInt("LockoutFromTimeInt")), 0, 0); DateTime lockOutTo = new DateTime(current.Year, current.Month, current.Day, (PlayerPrefs.GetInt("LockoutToTimeInt")), 0, 0); if (PlayerPrefs.GetString("LockoutToTimeString") != null && PlayerPrefs.GetString("LockoutToTimeString") != "") { timeText.text = (PlayerPrefs.GetString("LockoutToTimeString")); } DateTime lockOutToOvernight = new DateTime(current.Year, current.Month, current.Day, ((PlayerPrefs.GetInt("LockoutToTimeInt")) + 1), 0, 0); dataService = StartupScript.ds; //Display ChildName Key saved in PlayerPref in the ChildNameText game object in scene, or display "My" if the childnamekey is blank or null if ((PlayerPrefs.GetString("ChildNameKey") == "") || (PlayerPrefs.GetString("ChildNameKey") == null)) { childnameText.text = "My"; } else { childnameText.text = PlayerPrefs.GetString("ChildNameKey") + "'s"; } if (!RuntimeManager.IsInitialized()) { RuntimeManager.Init(); } // Check if lock out prefs exist if (isLockOn) { if (lockOutFrom < lockOutTo) { if ((current > lockOutFrom) && (current < lockOutTo)) { noAccessPrompt.SetActive(true); startButton.interactable = false; } } else if (lockOutTo < lockOutFrom) { if ((current > lockOutFrom) || (current < (lockOutTo))) { noAccessPrompt.SetActive(true); startButton.interactable = false; } } } CheckIfFirstOpenAfterInstall(); }