コード例 #1
0
    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();
        }
    }
コード例 #2
0
    // 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();
            }
        }
    }
コード例 #3
0
    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();
        }
    }
コード例 #4
0
    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();
        }
    }
コード例 #5
0
    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);
        }
    }
コード例 #6
0
 public CON_PlayList(MasterClass newMaster) : base(newMaster)
 {
     master = (MAS_PlayList)newMaster;
 }