コード例 #1
0
    public void Initialize()
    {
        if (frontGround == null)
        {
            frontGround = GameObject.Find("FrontGround").GetComponent <Image>();
        }
        if (IntroUI == null)
        {
            IntroUI = GameObject.FindObjectOfType <UIIntro>();
        }
        if (LoadingUI == null)
        {
            LoadingUI = GameObject.FindObjectOfType <UILoading>();
        }
        if (TimerUI == null)
        {
            TimerUI = GameObject.FindObjectOfType <UITimer>();
        }
        if (ScoreUI == null)
        {
            ScoreUI = GameObject.FindObjectOfType <UIScore>();
        }
        if (ResultUI == null)
        {
            ResultUI = GameObject.FindObjectOfType <UIResult>();
        }

        IntroUI.Initialize(this);
        LoadingUI.Initialize(this);
        TimerUI.Initialize(this);
        ScoreUI.Initialize(this);
        ResultUI.Initialize(this);
    }
コード例 #2
0
ファイル: Facade.cs プロジェクト: mengtest/TestFrameSync
 public void ChangeScene(string name, bool needLoading = true)
 {
     if (needLoading)
     {
         UILoading.LoadSceneAsync(name);
     }
 }
コード例 #3
0
ファイル: GameApp.cs プロジェクト: s344951241/mj
 private void OnLoadUILoading()
 {
     UILoading.subTitle = "正在加载,请耐心等待";
     UILoading.ShowLoading();
     isInit = true;
     LoadNeedRes();
 }
コード例 #4
0
    public void ChangeScene(string name)
    {
        if (true == string.IsNullOrEmpty(name))
        {
            return;
        }

        AssetManager.Instance.DestroyAll();
        //화면 다 없앰
        UIManager.Instance.ClearUI();
        //UI 관리 레이어 클리어

        #region fade
        UIFade ui = UIManager.Instance.Open("UIFade") as UIFade;
        ui.m_openCallback = () =>
        {
            m_loading = UIManager.Instance.Open("UILoading") as UILoading;
            m_loading.transform.SetAsFirstSibling();
        };
        ui.m_closeCallback = () =>
        {
            StartCoroutine(StartChangeScene(name));
        };
        #endregion
    }
コード例 #5
0
ファイル: UIMgr.cs プロジェクト: sambsp/ColaFrameWork
        public UIMgr()
        {
            uiList       = new Dictionary <string, UIBase>();
            outTouchList = new List <UIBase>();
            removeList   = new List <UIBase>();
            recordList   = new List <UIBase>();
            uiSorterMgr  = new UISorterMgr(1, 8000);
            InitRegisterHandler();

            HUDTopBoardRoot = new GameObject("HUDTopBoardRoot");
            HUDTopBoardRoot.transform.SetParent(GUIHelper.GetUIRootObj().transform, false);
            HUDTopBoardRoot.layer = LayerMask.NameToLayer("UI");
            var canvas = HUDTopBoardRoot.AddComponent <Canvas>();

            canvas.overrideSorting = true;
            canvas.sortingOrder    = GUIHelper.GetUIRoot().sortingOrder - 2;

            HUDTopBoradCache = new GameObject("HUDTopBoradCache");
            GameObject.DontDestroyOnLoad(HUDTopBoradCache);
            HUDTopBoradCache.SetActive(false);

            /*---------------UI界面控制脚本添加-------------------*/
            UIBase ui = new UILogin(100, UILevel.Level1);

            uiList.Add("UILogin", ui);
            ui = new UILoading(101, UILevel.Common);
            uiList.Add("UILoading", ui);
        }
コード例 #6
0
ファイル: UIManager.cs プロジェクト: hu-bingbing/TestPolyDemo
        //==========================================================================================
        #region UILoading管理


        public UILoading OpenLoading(string name, object arg = null)
        {
            Debuger.Log(name);
            UILoading ui = Open <UILoading>(name, arg);

            return(ui);
        }
コード例 #7
0
 private void DownLoadCompleteAll()
 {
     UILoading.CloseLoading();
     if (callBack != null)
     {
         callBack(m_kScenePrefab);
     }
 }
コード例 #8
0
ファイル: GameApp.cs プロジェクト: s344951241/mj
 private void OnCompleteLoaded()
 {
     showProgress = false;
     UILoading.CloseLoading();
     setUIRoot();
     //TestPanel.Instance.load();
     SoundMgr._instance.bgmPlay("beijing_dating" + GameConst.BGM, GameConst.musicVol);
     LoginPanel.Instance.load();
 }
コード例 #9
0
    protected override void InitComponents()
    {
        sinstance = this;

        TextContent         = FindWidget <Text>("TextContent");
        TextContent.text    = "";
        Progress            = FindWidget <Image>("SliderProgress");
        Progress.fillAmount = 0;
    }
コード例 #10
0
    void Awake()
    {
        Instance = this;
        RemoveMessage(this, MessageList);
        RegisterMessage(this, MessageList);
        var rect = m_progressBar.transform.parent.GetComponent <RectTransform>();

        m_progressWidth = rect.sizeDelta.x;
    }
コード例 #11
0
ファイル: UIManager.cs プロジェクト: yabos/BattleMasters
    public void SetLoadingPanelInfo(string currentPageName, string nextPageName)
    {
        UILoading widget = m_widgetRepositories.FindWidget("UILoading") as UILoading;

        if (widget != null)
        {
            widget.SetLoadingPanelInfo(currentPageName, nextPageName);
        }
    }
コード例 #12
0
ファイル: UIManager.cs プロジェクト: yabos/BattleMasters
    public void SetLoadingProgressInfo(float progress)
    {
        UILoading widget = m_widgetRepositories.FindWidget("UILoading") as UILoading;

        if (widget != null)
        {
            widget.SetLoadingProgressInfo(progress);
        }
    }
コード例 #13
0
ファイル: UIManager.cs プロジェクト: yabos/BattleMasters
    public void HideLoadingWidget(float deactiveTime = 0.0f)
    {
        UILoading widget = m_widgetRepositories.FindWidget("UILoading") as UILoading;

        if (widget != null)
        {
            widget.Hide(deactiveTime);
        }
    }
コード例 #14
0
 void OnDestroy()
 {
     uiPlay        = null;
     uiMenu        = null;
     uiTitle       = null;
     uiLoading     = null;
     uiSystemPopup = null;
     popupPaused   = null;
     instance      = null;
 }
コード例 #15
0
ファイル: GameLoadingState.cs プロジェクト: 977567460/Escapes
    public override void Enter()
    {
        base.Enter();
        GLCommand ev = Cmd as GLCommand;

        mLoadingSceneId = ev.SceneID;
        UIManage.Instance.Clear();
        UIManage.Instance.OpenWindow(WindowID.UI_LOADING);
        mLoadingWindow = (UILoading)UIManage.Instance.GetWindow(WindowID.UI_LOADING);
    }
コード例 #16
0
 private void Init()
 {
     _instance        = this;
     mTransform       = transform;
     bar              = mTransform.Find("bar").GetComponent <Image>();
     transformBarHead = mTransform.Find("bar/bar_head");
     text_tip         = mTransform.Find("text_tip").GetComponent <Text>();
     SetBarProgress(0);
     gameObject.SetActive(false);
 }
コード例 #17
0
ファイル: UIManager.cs プロジェクト: hu-bingbing/TestPolyDemo
        public void CloseLoading(string name, object arg = null)
        {
            Debuger.Log(name);
            UILoading ui = GetUI(name) as UILoading;

            if (ui != null)
            {
                ui.Close(arg);
            }
        }
コード例 #18
0
ファイル: UILoading.cs プロジェクト: moto2002/snowbattle
    static public UILoading GetInstance()
    {
        UILoading self = UIManager.Singleton.GetUIWithoutLoad <UILoading>();

        if (self != null)
        {
            return(self);
        }
        self = UIManager.Singleton.LoadUI <UILoading>("UI/UILoading", UIManager.Anchor.Center);
        return(self);
    }
コード例 #19
0
ファイル: SceneObserver.cs プロジェクト: oathx/Six
	/// <summary>
	/// Awake this instance.
	/// </summary>
	void Awake()
	{
		LoadingUI = UISystem.GetSingleton().LoadWidget<UILoading>(ResourceDef.UI_LOADING, false);
		if (!LoadingUI)
			throw new System.NullReferenceException();
	
		SubscribeEvent(CmdEvent.CMD_SCENE_LOADSTART, 	OnSceneStart);
		SubscribeEvent(CmdEvent.CMD_SCENE_LOADING, 		OnSceneLoading);
		SubscribeEvent(CmdEvent.CMD_SCENE_LOADFINISH,	OnSceneFinished);
		SubscribeEvent(CmdEvent.CMD_SCENE_TRIGGER,		OnSceneTrigger);
	}
コード例 #20
0
ファイル: UIManager.cs プロジェクト: ChestnutGames/boxing
    public UILoading ShowLoading()
    {
        if (mLoading != null)
        {
            return(mLoading);
        }

        mLoading = ResourceManager.New <UILoading>(string.Format("UI/{0}", GetNameFromType(typeof(UILoading))));
        U3DMod.AddChild(uiRoot, mLoading.gameObject);
        mLoading.progresPersent = 0;
        return(mLoading);
    }
コード例 #21
0
 public void Uninitialize()
 {
     if (isInitialized)
     {
         if (_ui != null)
         {
             _ui.Uninitialize();
             _ui = null;
         }
         isInitialized = false;
     }
 }
コード例 #22
0
    public void Initialize()
    {
        if (_ui == null)
        {
            _ui = new UILoading();
        }

        goUI = GameSystem.Instance.mClient.mUIManager.CreateUI("Prefab/GUI/UILoading");
        _ui.Initialize(goUI);

        Scheduler.Instance.AddUpdator(Update);
        GameSystem.Instance.showLoading = true;

        isInitialized = true;


        string str = GameSystem.Instance.CommonConfig.GetString("gLoadingBg");

        string[] items = str.Split('&');
        int      nt    = 0;
        Dictionary <int, string> bgDic = new Dictionary <int, string>();

        List <int> bgList = new List <int>();

        foreach (string item in items)
        {
            string[] info   = item.Split(':');
            string   bg     = info[0];
            int      weight = int.Parse(info[1]);
            if (weight == 0)
            {
                continue;
            }
            nt += weight;
            bgDic.Add(nt, bg);
            bgList.Add(nt);
        }
        int randNum = UnityEngine.Random.Range(1, nt);
        int key     = -1;

        for (int i = 0; i < bgList.Count; i++)
        {
            if (randNum <= bgList[i])
            {
                key = bgList[i];
                break;
            }
        }
        string bgStr = bgDic[key];

        _ui._bg.mainTexture = ResourceLoadManager.Instance.GetResources("Texture/" + bgStr, true) as Texture;
    }
コード例 #23
0
 static int set_Instance(IntPtr L)
 {
     try
     {
         UILoading arg0 = (UILoading)ToLua.CheckUnityObject(L, 2, typeof(UILoading));
         UILoading.Instance = arg0;
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #24
0
ファイル: GameApp.cs プロジェクト: jiangjx888/thewar
    private void ShowLoadingBar()
    {
        UILoading.subTitle = "正在加载中,请耐心等待,<color=yellow>(此加载不消耗流量)</color>";
        UILoading.ShowLoading();

        gameObject.AddComponent <ResourceMgr>();
        ResourceMgr.Instance.InitFunc = () =>
        {
            otherStep++;
            OnNeedResLoaded(new object());
            ResourceMgr.Instance.DownLoadBundles(URLConst.listInitGameRes.ToArray(), OnNeedResLoaded,
                                                 ResourceMgr.DEFAULT_PRIORITY, OnDownLoadCallBack);
        };
    }
コード例 #25
0
 static int LoadEnd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UILoading obj = (UILoading)ToLua.CheckObject(L, 1, typeof(UILoading));
         obj.LoadEnd();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #26
0
ファイル: UILoadingWrap.cs プロジェクト: PayneC/ProjectA
 static int OpenLoading(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UILoading obj = (UILoading)ToLua.CheckObject <UILoading>(L, 1);
         obj.OpenLoading();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #27
0
 static int UpdateDownload(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UILoading obj  = (UILoading)ToLua.CheckObject(L, 1, typeof(UILoading));
         string    arg0 = ToLua.CheckString(L, 2);
         obj.UpdateDownload(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #28
0
 static int OnMessage(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UILoading obj  = (UILoading)ToLua.CheckObject(L, 1, typeof(UILoading));
         IMessage  arg0 = (IMessage)ToLua.CheckObject(L, 2, typeof(IMessage));
         obj.OnMessage(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #29
0
ファイル: UIManager.cs プロジェクト: yabos/BattleMasters
    public void ShowLoadingWidget(float activeTime = 0.0f, string currentPageName = "", string nextPageName = "")
    {
        UILoading widget = m_widgetRepositories.FindWidget("UILoading") as UILoading;

        if (widget == null)
        {
            widget = m_widgetRepositories.CreateWidget <UILoading>("UI/Prefabs/System/UILoading");
        }

        if (widget != null)
        {
            widget.Show(activeTime);
            widget.SetLoadingPanelInfo(currentPageName, nextPageName);
            widget.SetLoadingProgressInfo(0.0f);
        }
    }
コード例 #30
0
    static int set_m_desc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UILoading obj  = (UILoading)o;
            UI.TextEx arg0 = (UI.TextEx)ToLua.CheckUnityObject(L, 2, typeof(UI.TextEx));
            obj.m_desc = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_desc on a nil value" : e.Message));
        }
    }
コード例 #31
0
    static int get_m_desc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UILoading obj = (UILoading)o;
            UI.TextEx ret = obj.m_desc;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_desc on a nil value" : e.Message));
        }
    }
コード例 #32
0
ファイル: UILoading.cs プロジェクト: zhaoyabo/GameBase
 private void Init()
 {
     _instance = this;
     mTransform = transform;
     bar = mTransform.Find("bar").GetComponent<Image>();
     transformBarHead = mTransform.Find("bar/bar_head");
     text_tip = mTransform.Find("text_tip").GetComponent<Text>();
     SetBarProgress(0);
     gameObject.SetActive(false);
 }
コード例 #33
0
ファイル: SceneObserver.cs プロジェクト: oathx/Six
	/// <summary>
	/// Awake this instance.
	/// </summary>
	void Awake()
	{
		LoadUI = UISystem.GetSingleton().LoadWidget<UILoading>(ResourceDef.UI_LOADING, false);
	}
コード例 #34
0
ファイル: LoadingObserver.cs プロジェクト: oathx/Six
	/// <summary>
	/// Active this instance.
	/// </summary>
	public override void Active()
	{
		if (!LoadUI)
			LoadUI = UISystem.GetSingleton().LoadWidget<UILoading>(ResourceDef.UI_LOADING);
	}