コード例 #1
0
ファイル: MainMenu.cs プロジェクト: autumnscruggs/SmileGame
    private void Awake()
    {
        if (AsyncToggle.loadAsynchronously)
        {
            asyncTutorialScene = this.gameObject.AddComponent <AsyncLoading>();
            asyncTutorialScene.sceneToLoadNext = Scenes.TutorialScene;

            asyncHubWorldScene = this.gameObject.AddComponent <AsyncLoading>();
            asyncHubWorldScene.sceneToLoadNext = Scenes.HubWorldScene;
        }

        ShowOptions(false);
        ShowCredits(false);
    }
コード例 #2
0
    public void LoadScene(string sceneName)
    {
        AsyncLoading levelToLoad = System.Array.Find(asyncLevels, item => item.sceneToLoadNext == sceneName);
        int          index       = System.Array.IndexOf(asyncLevels, levelToLoad);

        for (int x = 0; x < asyncLevels.Length; x++)
        {
            if (x != index)
            {
                asyncLevels[x].KillScene();
            }
        }

        asyncLevels[index].LoadScene();
    }
コード例 #3
0
    void Awake()
    {
        #region Singleton
        // Create singleton instance
        singleton = this;
        #endregion

        if (AsyncToggle.loadAsynchronously)
        {
            hubWorldAsync = this.gameObject.AddComponent <AsyncLoading>();
            hubWorldAsync.sceneToLoadNext = Scenes.HubWorldScene;

            endGameAsync = this.gameObject.AddComponent <AsyncLoading>();
            endGameAsync.sceneToLoadNext = Scenes.EndGameScene;

            mainMenuAsync = this.gameObject.AddComponent <AsyncLoading>();
            mainMenuAsync.sceneToLoadNext = Scenes.MainMenuScene;
        }
    }
コード例 #4
0
        public bool HaveColumn(string columnName, string columnValue, out bool retValueMatched)
        {
            bool ret          = false;
            bool valueMatched = false;

            if (columnName == "InfoPageID")
            {
                ret = true;
                if (InfoPageID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageGUID")
            {
                ret = true;
                if (InfoPageGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "RevisionNo")
            {
                ret = true;
                if (RevisionNo.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserID")
            {
                ret = true;
                if (UserID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserGUID")
            {
                ret = true;
                if (UserGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedDate")
            {
                ret = true;
                if (CreatedDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "LastUpdateDate")
            {
                ret = true;
                if (LastUpdateDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedUserID")
            {
                ret = true;
                if (CreatedUserID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedUserGUID")
            {
                ret = true;
                if (CreatedUserGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageName")
            {
                ret = true;
                if (InfoPageName.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageDescription")
            {
                ret = true;
                if (InfoPageDescription.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryID")
            {
                ret = true;
                if (InfoCategoryID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryGUID")
            {
                ret = true;
                if (InfoCategoryGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AccessGroupID")
            {
                ret = true;
                if (AccessGroupID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AccessGroupGUID")
            {
                ret = true;
                if (AccessGroupGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AsyncLoading")
            {
                ret = true;
                if (AsyncLoading.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Commentable")
            {
                ret = true;
                if (Commentable.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorRoleList")
            {
                ret = true;
                if (CommentorRoleList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorGroupList")
            {
                ret = true;
                if (CommentorGroupList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorHideRoleList")
            {
                ret = true;
                if (CommentorHideRoleList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorHideGroupList")
            {
                ret = true;
                if (CommentorHideGroupList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsActive")
            {
                ret = true;
                if (IsActive.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "ExpiryDate")
            {
                ret = true;
                if (ExpiryDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsCommon")
            {
                ret = true;
                if (IsCommon.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsPublic")
            {
                ret = true;
                if (IsPublic.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Sequence")
            {
                ret = true;
                if (Sequence.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsDeleted")
            {
                ret = true;
                if (IsDeleted.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            retValueMatched = valueMatched;
            return(ret);
        }