Exemplo n.º 1
0
        public bool IsFinishedLoading()
        {
            for (UiScene scene = UiScene.SessionUi; scene < UiScene.Count; scene++)
            {
                if (!_uiReferences.ContainsKey(scene))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
    public T ShowSceneUi <T>(string name = null) where T : UiScene
    {
        if (string.IsNullOrEmpty(name))
        {
            name = typeof(T).Name;
        }

        GameObject obj   = Managers.Resource.Instantiate($"Ui/Scene/{name}");
        T          scene = Util.GetOrAddComponent <T>(obj);

        sceneUi = scene;

        obj.transform.SetParent(Root.transform);
        return(scene);
    }
Exemplo n.º 3
0
 public void Clear()
 {
     CloseAllPopupUi();
     sceneUi = null;
 }
Exemplo n.º 4
0
 private void StartLoadingScene(UiScene scene) => SceneManager.LoadSceneAsync(scene.ToString(), LoadSceneMode.Additive);
Exemplo n.º 5
0
 public UiReference(UiScene scene, UiPrefab prefab)
 {
     Scene  = scene;
     Prefab = prefab;
     Name   = UiElements.PrefabPathFromEnum(prefab);
 }