상속: MonoBehaviour
예제 #1
0
    private void Awake()
    {
        IP = string.Empty;
        if (Loading != null)
        {
            LoadingCache = Loading;
        }

        if (GetIpOnAwake)
        {
            StartCoroutine(GetIP());             // Do my coroutine here and don't forget.
        }

        _Descrip = Description;
        OnLogin += onLogin;         //resolve it later
        StartCoroutine(FadeOut());  // Do my coroutine here for fading the GameObj. in the scene
        if (GameObject.Find(SavedUser) == null)
        {
            GameObject person = Instantiate(PlayerInfo, Vector3.zero, Quaternion.identity) as GameObject;
            person.name = person.name.Replace("(Clone)", "");
            saveInfo    = person.GetComponent <SaveInfo>();
        }
        else
        {
            saveInfo = GameObject.Find("PlayerInfo").GetComponent <SaveInfo>();
        }
    }
예제 #2
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	Loading表示有効化
     */
    //----------------------------------------------------------------------------
    public void RequestLoadingStart(LOADING_TYPE eLoadingType = LOADING_TYPE.NONE)
    {
        if (MovieManager.HasInstance)
        {
            return;
        }

        if (m_currentEffect != null)
        {
            return;
        }

        m_currentType = eLoadingType;

        switch (eLoadingType)
        {
        case LOADING_TYPE.DATA_DOWNLOAD:
            m_currentEffect = LoadingEffectDownload.Attach(m_effectRoot);
            setMask(true, true);
            break;

        case LOADING_TYPE.TO_BATTLE:
        case LOADING_TYPE.TO_HOME:
            m_currentEffect = LoadingEffectSimple.Attach(m_effectRoot);
            setMask(true, true);
            break;

        case LOADING_TYPE.WITH_TIPS:
            m_currentEffect = LoadingEffectWithTips.Attach(m_effectRoot);
            break;

        case LOADING_TYPE.GUARD:
            m_currentEffect = LoadingEffectHTTPConnect.Attach(m_effectRoot);
            setMask(true, false);
            break;

        default:
            m_currentEffect = LoadingEffectHTTPConnect.Attach(m_effectRoot);
            setMask(true, false);
            break;
        }
    }
예제 #3
0
    protected IEnumerator LoadScence(SceneInfo sceneInfo)
    {
        displayTextUiController.onChangeScene();
        LoadingEffect loadingEffect = gLoadingEffect.GetComponent <LoadingEffect>();

        loadingEffect.loading = true;
        uiEventHandler.onSceneChange(currentSceneIdx, assetBundleInfo.totalScenes);
        float startTime = Time.realtimeSinceStartup;

        // Load level from assetBundle.
        yield return(AssetBundleHelper.getInstance().LoadScene(assetBundleName, sceneInfo.name, true));

        uiEventHandler.OndoneLoadScene();
        // Calculate and display the elapsed time.
        float elapsedTime = Time.realtimeSinceStartup - startTime;

        if (Debug.isDebugBuild)
        {
            Debug.Log("Finished loading scene: " + sceneInfo.name + " in " + elapsedTime + " seconds");
        }
        interactiveProcessing(sceneInfo);
        loadingEffect.loading = false;
        //gLoadingEffect.GetComponent<Renderer>().enabled = false;
    }
예제 #4
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	Loading表示無効化
     */
    //----------------------------------------------------------------------------
    public void RequestLoadingFinish(LOADING_TYPE eLoadingType = LOADING_TYPE.NONE)
    {
        if (MovieManager.HasInstance)
        {
            return;
        }

        if (m_currentEffect == null)
        {
            return;
        }

        if (m_currentType != eLoadingType &&
            eLoadingType != LOADING_TYPE.NONE)
        {
            return;
        }

        setMask(false, false);

        m_currentEffect.Detach();
        m_currentEffect = null;
        m_currentType   = LOADING_TYPE.NONE;
    }