public void Reset(bool skipReload) { if (Resetting != null) { Resetting(this, EventArgs.Empty); } LoadingPanel loadingPanel = null; if (PanelManager.Instance) { loadingPanel = PanelManager.Instance.Push <LoadingPanel>(); } ScriptManager.Instance.Reset(() => { if (skipReload) { ScriptManager.Instance.RunScripts(); } else { ReloadFromServer(loadingPanel); } }); }
public void OpenLoadingPanel(bool on) { if (LoadingPanel == null) { UIBasePanel panel = GetPanel("LoadingPanel"); if (panel == null) { panel = Open("LoadingPanel"); } if (panel != null) { LoadingPanel loading = panel.GetComponent <LoadingPanel>(); if (loading != null) { LoadingPanel = loading; } } } if (LoadingPanel != null) { if (on == false) { LoadingPanel.Close(); } else { LoadingPanel.LateInit(); } } }
// Use this for initialization void Start() { loadingPanel = new LoadingPanel(); loadingPanel.Show(); startTime = Time.time; m_UIManager = gameObject.AddComponent <UIManager>() as UIManager; m_UIManager.SetParameter(8, 1, false); //m_UIManager.SetUIHandler(this); m_UIManager.CLEAR = true; Transform audioFolderTrans = transform.Find("Audio"); audioPlayer.AddAudio(audioFolderTrans, "Button"); audioPlayer.AddAudio(audioFolderTrans, "Battle"); GameApp.GetInstance().GetGameState().Achievement.SubmitAllToGameCenter(); if (!GameApp.GetInstance().GetGameState().FromShopMenu) { m_UIManager.Add(loadingPanel); } StartCoroutine("Init"); }
public override void OnEnter(object param1 = null, object param2 = null, object param3 = null) { mPanel = UIObj.GetComponent <LoadingPanel>(); loading = (ProcedureLoadingScene)param1; UIObj.SetActive(true); }
void Awake() { mNetworkManager = (NetworkManager)GameObject.FindObjectOfType(typeof(NetworkManager)); mGamesList = (dfListbox)GameObject.FindObjectOfType(typeof(dfListbox)); mLoadingPanel = (LoadingPanel)GameObject.FindObjectOfType(typeof(LoadingPanel)); mErrorPanel = (ErrorPanel)GameObject.FindObjectOfType(typeof(ErrorPanel)); }
// Main Menu Panel // Begins the game void StartGame() { MainMenuPanel.SetActive(false); LoadingPanel.SetActive(true); StartCoroutine(LoadAsynchronously(1, 2)); }
public void LoadSceneAsyncDelayed(EntryPoint sceneName, float delay = 2.0f) { LoadingPanel.Show(); EventManager.BaseEvents.OnSceneWillBeLoaded.Invoke(sceneName, LoadSceneMode.Additive); StartCoroutine(Delay(delay, () => { LoadSceneInternal(sceneName, SceneLoadType.Async, LoadSceneMode.Single, false); })); }
void Start() { ControlsPanel = GetComponentInChildren <ControlsPanelController>(); LoadingPanel = GetComponentInChildren <LoadingPanel>(); HidePannels(); UI.Instance.PanelVisibility(UI.Panel.Control, true); }
protected override void OnCreate() { InitTrans(); BindListener(MainMenuButton_Button, delegate { Jyx2_UIManager.Instance.HideUI("SystemUIPanel"); List <string> selectionContent = new List <string>() { "是", "否" }; Jyx2_UIManager.Instance.ShowUI("ChatUIPanel", ChatType.Selection, "主角", "将丢失未保存进度,是否继续?", selectionContent, new Action <int>((index) => { if (index == 0) { LoadingPanel.Create("0_GameStart", () => { }); } })); }); //返回游戏 BindListener(QuitGameButton_Button, () => { Jyx2_UIManager.Instance.HideUI("SystemUIPanel"); //Application.Quit(); }); BindListener(SaveButton_Button, delegate { Jyx2_UIManager.Instance.ShowUI("SavePanel", new Action <int>((index) => { var levelMaster = FindObjectOfType <LevelMaster>(); levelMaster.OnManuelSave(index); })); }); BindListener(LoadButton_Button, () => { Jyx2_UIManager.Instance.ShowUI("SavePanel", new Action <int>((index) => { StoryEngine.DoLoadGame(index); Jyx2_UIManager.Instance.HideUI("SystemUIPanel"); })); }); BindListener(GraphicSettingsButton_Button, delegate { Jyx2_UIManager.Instance.HideUI("SystemUIPanel"); //runTimeHelper.ShowGraphicSettingsPanel(); }); BindListener(MainBg_Button, delegate { Jyx2_UIManager.Instance.HideUI("SystemUIPanel"); }); }
void Awake() { mMyPlayerInfoPrefab = (GameObject)Resources.Load("Lobby/Prefabs/MyPlayerInfoBox"); mPlayerInfoPrefab = (GameObject)Resources.Load("Lobby/Prefabs/PlayerInfoBox"); mPlayersList = (dfScrollPanel)GameObject.FindObjectOfType(typeof(dfScrollPanel)); mChat = (dfRichTextLabel)GameObject.FindObjectOfType(typeof(dfRichTextLabel)); mLoadingPanel = (LoadingPanel)GameObject.FindObjectOfType(typeof(LoadingPanel)); mNetworkManager = (NetworkManager)GameObject.FindObjectOfType(typeof(NetworkManager)); }
private void Awake() { if (instance == null) { instance = this; } SetInit(); }
public IEnumerator InitPlayer(LoadingPanel loadingPanel) { yield return(new WaitForSeconds(0.8f)); //暂停loading界面 , 测试代码 //Debug.Log(" Loading completed ! "); GameObject playerPanelObj = UIContext.Instance.ShowPanel(EUIPanel.PlayingPanel); UIContext.Instance.ClosePanel(EUIPanel.LoadingPanel); }
public void OnEnter(EApplicationState?lastState, System.Object parameter) { //Debug.Log(" painting state Enter "); GameObject LoadingPanelPanelObj = UIContext.Instance.ShowPanel(EUIPanel.LoadingPanel); LoadingPanel loadingPanel = LoadingPanelPanelObj.GetComponent <LoadingPanel>(); GameRoot.Instance.StartCoroutine(InitPlayer(loadingPanel)); }
private void StartFadingStream(IConnectableObservable <TimeInterval <float> > stream) { LoadingPanel loadingPanel = Singleton <Manager.Scene> .Instance.loadingPanel; float startAlpha = loadingPanel.CanvasGroup.get_alpha(); Manager.Map instance = Singleton <Manager.Map> .Instance; using (IEnumerator <KeyValuePair <int, AgentActor> > enumerator = instance.AgentTable.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, AgentActor> current = enumerator.Current; if (current.Value.AgentData.CarryingItem != null && current.Value.Mode != Desire.ActionType.SearchEatSpot && (current.Value.Mode != Desire.ActionType.EndTaskEat && current.Value.Mode != Desire.ActionType.EndTaskEatThere)) { current.Value.AgentData.CarryingItem = (StuffItem)null; } current.Value.EnableBehavior(); current.Value.BehaviorResources.ChangeMode(current.Value.Mode); } } PlayerActor player = instance.Player; string stateFromCharaCreate = Game.PrevPlayerStateFromCharaCreate; if (!stateFromCharaCreate.IsNullOrEmpty()) { player.PlayerController.ChangeState(stateFromCharaCreate); player.CurrentDevicePoint = Singleton <Manager.Map> .Instance.PointAgent.DevicePointDic[Game.PrevAccessDeviceID]; } else { ReadOnlyDictionary <int, AgentActor> agentTable = instance.AgentTable; int? partnerId = player.PlayerData.PartnerID; int num = !partnerId.HasValue ? -1 : partnerId.Value; AgentActor agentActor; ref AgentActor local = ref agentActor; if (agentTable.TryGetValue(num, ref local)) { player.Partner = (Actor)agentActor; agentActor.Partner = (Actor)player; if (player.PlayerData.IsOnbu) { player.PlayerController.ChangeState("Onbu"); } else { agentActor.BehaviorResources.ChangeMode(Desire.ActionType.Date); agentActor.Mode = Desire.ActionType.Date; player.Mode = Desire.ActionType.Date; player.PlayerController.ChangeState("Normal"); } } else { player.PlayerController.ChangeState("Normal"); } }
public void Resume() { gameObject.GetComponentInChildren <ProgressOficial>().Speed = 0; gameObject.transform.localScale = new Vector3(0, 0, 0); Time.timeScale = 1; ProgressSurvive.GetComponent <ProgressOficial>().Renew(); IsWatched = true; PlayerPrefs.SetString("Watched", "Yes"); LoadingPanel.SetActive(false); UIHandler.ContinueWithAd(Play, gameObject); }
public void StartInvoker() { StartSystem(); if (_panel == null) { _panel = GetPanel <LoadingPanel>(); } _panel.UpdateProgress(0f); _nbCommand = _commandsBuffer.Count; _isStart = _nbCommand > 0; }
Loading() { Transform parent = UIRootFinder.uiRootTran; GameObject asset = (GameObject)AssetManager.Instance.LoadPrefab("LoadingPanel"); panel = GameObject.Instantiate(asset) as GameObject; loadingpanel = panel.GetComponent <LoadingPanel>(); panel.transform.parent = parent; panel.transform.localScale = Vector3.one; panel.SetActive(false); webViewPanel = GameObject.Find("webMediator"); }
// Start is called before the first frame update void Start() { // Determines which scene is open switch (SceneManager.GetActiveScene().name) { case "Main Menu": IsLoadingLevel = false; MainMenuPanel.SetActive(true); ControlsPanel.SetActive(false); CreditsPanel.SetActive(false); LoadingPanel.SetActive(false); MusicCreditsTitle.SetActive(false); MusicCredits.SetActive(false); ArtCreditsTitle.SetActive(false); ArtCredits.SetActive(false); ProgrammingCreditsTitle.SetActive(false); ProgrammingCredits.SetActive(false); GameDesignCreditsTitle.SetActive(false); GameDesignCredits.SetActive(false); TutorialIndex = 0; break; case "Gamefield": IsLoadingLevel = false; // Holds the amount of time which has elapsed Seconds = 60.0f; WaveInProgress = true; // Holds the wave of enemies Wave = 1; // Determines whether the lose conditions of the game has been met PlayerHasLost = false; Direction = 0; InitiateCameras(); SelectedBarracks = Barracks[0]; UIBarracksBlocked.SetActive(false); UIPrompt.gameObject.SetActive(false); Currency = 1000; SpawnGates = GameObject.FindGameObjectsWithTag("Spawn Gate"); AutoAttack = true; break; } }
public override void OnUpdate() { if (LoadingPanel.ReferenceEquals(m_Panel, null)) { return; } m_Panel.m_LoadingBar.value = GameMapManager.LoadingProgress / 100.0f; m_Panel.m_LoadingValue.text = string.Format("{0}%", GameMapManager.LoadingProgress); if (GameMapManager.LoadingProgress >= 100) { LoadOtherScene(); } }
public async void RevertUi(bool force) { if (_resultShown && !force) { return; } LoadingPanel.SetValue(VisibilityAnimation.VisibleProperty, false); await Task.Delay(200); if (Model.Renderer != null) { Model.Renderer.SetCameraHigher = true; } }
public override void OnUpdate() { if (m_MainPanel == null) { return; } m_MainPanel = GameObject.GetComponent <LoadingPanel>(); m_MainPanel.m_Slider.value = SceneManager.LoadingProgress / 100.0f; m_MainPanel.m_Text.text = string.Format("{0}%", SceneManager.LoadingProgress); if (SceneManager.LoadingProgress >= 99) { LoadOtherScene(); } }
public void Open(Action execOK) { string panelPath = "Prefabs/UI/LoadingPanel"; var prefab = resMgr.LoadResAsset<GameObject>(panelPath); if (prefab != null) { var parent = GameObject.FindWithTag("UICanvas"); var gameObj = Instantiate<GameObject>(prefab); gameObj.transform.SetParent(parent.transform); gameObj.transform.localPosition = Vector3.zero; gameObj.transform.localScale = Vector3.one; panel = gameObj.AddComponent<LoadingPanel>(); if (execOK != null) execOK(); } }
// Use this for initialization void Start() { TTUIPage.ShowPage <LoadingPanel>(); LoadingPanel panel = TTUIPage.allPages["LoadingPanel"] as LoadingPanel; loadingSlider = panel.sliderLoading; loadingText = panel.textProgress; loadingSlider.value = 0.0f; if (SceneManager.GetActiveScene().name == "Loading") { //启动协程 StartCoroutine(AsyncLoading()); } }
public void Start() { LoadingPanel loadingPanel = null; if (PanelManager.Instance) { loadingPanel = PanelManager.Instance.Push<LoadingPanel>(); } ReloadFromServer(loadingPanel); if (Started != null) { Started(this, EventArgs.Empty); } Platform.Instance.FireInteractionEvent("appStart"); }
//加载战斗 public static void LoadBattle(int battleId, Action <BattleResult> callback) { var battle = ConfigTable.Get <Jyx2Battle>(battleId); string sceneName = "Jyx2Battle_" + battle.MapId; if (!Application.CanStreamedLevelBeLoaded(sceneName)) { sceneName = "BattleScene_hufeiju"; } LoadingPanel.Create(sceneName, () => { GameObject obj = new GameObject("BattleLoader"); var battleLoader = obj.AddComponent <BattleLoader>(); battleLoader.m_BattleId = battleId; battleLoader.Callback = callback; }); }
void Start() { GameLogic.WaitFunc StartGame = delegate() { Count++; Slider.GetComponent <Slider>().value = Count; if (Count == 4) { LoadingPanel.SetActive(false); Deck.GetComponent <DeckObject>().StartGame(); } }; StartCoroutine(GameLogic.wait(1f, StartGame, 4)); if (IsTablet()) { this.LandScapeBackground.SetActive(true); } }
public static bool IsExist() { if (panel == null) { try { panel = GameObject.Find("Tools_UI").transform.Find("LoadingPanel").GetComponent <LoadingPanel>(); } catch (NullReferenceException e) { Debug.Log("Loading object dosen't exist"); panel = null; } return(panel != null); } else { return(true); } }
private void btnSizeChange_Click(object sender, EventArgs e) { if (this.WindowState != FormWindowState.Maximized) { LoadingPanel.BringToFront(); LoadingPanel.Visible = true; this.Visible = false; LoadingCalc.LoadingValue = 0; Loading = true; timerLoad.Enabled = true; SidebarTransition.MaxAnimationTime = 500; SidebarTransition.TimeStep = Convert.ToSingle(0.09); this.WindowState = FormWindowState.Maximized; MaximizeBox(); btnCompress.Visible = true; btnMaximize.Visible = false; PageLeft.Size = new Size(55, 523); PageRight.Size = new Size(55, 523); PageLeftShadow.Size = new Size(55, 16); PageRightShadow.Size = new Size(55, 16); PageRightShadow.Location = new Point(PageRightShadow.Location.X - 24, PageRightShadow.Location.Y); this.CenterToScreen(); this.Visible = true; } else { LoadingPanel.BringToFront(); LoadingPanel.Visible = true; LoadingCalc.LoadingValue = 0; Loading = true; timerLoad.Enabled = true; SidebarTransition.MaxAnimationTime = 1500; SidebarTransition.TimeStep = Convert.ToSingle(0.02); PageLeft.Size = new Size(31, 523); PageRight.Size = new Size(31, 523); PageLeftShadow.Size = new Size(31, 16); PageRightShadow.Size = new Size(31, 16); PageRightShadow.Location = new Point(PageRightShadow.Location.X + 24, PageRightShadow.Location.Y); timerMinimize.Enabled = true; } }
async void IGameUi.Show(Game.StartProperties properties) { _resultShown = false; if (Model.Renderer != null) { Model.Renderer.SetCameraHigher = false; } await Task.Delay(1000); ProgressBar.Visibility = Visibility.Visible; LoadingText.Visibility = Visibility.Collapsed; PlayerNamePanel.Visibility = Visibility.Collapsed; GameResultOk.Visibility = Visibility.Hidden; LoadingPanel.SetValue(VisibilityAnimation.VisibleProperty, true); await Task.Delay(2000); DisableRenderer(); }
// Use this for initialization void Start() { FlurryTAd.ShowTAd(false); loadingPanel = new LoadingPanel(); loadingPanel.Show(); m_UIManager = gameObject.AddComponent <UIManager>() as UIManager; m_UIManager.SetParameter(8, 1, false); m_UIManager.SetUIHandler(this); m_UIManager.CLEAR = true; m_UIManager.Add(loadingPanel); startTime = Time.time; StartCoroutine("Init"); }