public void SetFreeFightUserKillData(int count, string name) { _FreeFightUserKillData.KillCount = count; _FreeFightUserKillData.UserName = name; HudPanel.SetPKText(_FreeFightUserKillData); }
public override void EndGame(bool isSuccess) { base.EndGame(isSuccess); HudPanel.GameEnd(isSuccess); PlayerController playerCtlr = G_GameInfo.PlayerController; uint clearGrade = 3; //Debug.LogWarning("2JW : SingleGame EndGame In TotalGold - " + playerCtlr.TotalGold); /* * TotalGachaData totalData = new TotalGachaData(); * totalData.gold = playerCtlr.TotalGold; * * if (isSuccess) * { * ///그냥 형식만. 획득한 아이템이 3개라는 것만 알린다. UIHelper에서 들고있는 GetFakeItemData에서 다 처리함 (난투장 획득 아이템에 대한 부분은 별도 퍼리해야할 것 같다.) * for (int i = 0; i < 4; i++) * { * NetData.GachaData item_0 = new NetData.GachaData(); * item_0.userItem = new NetData.ItemData(); * item_0.userItem.item_id = (uint)i + 1; * totalData.Add(item_0); * } * } */ StartCoroutine(ResultAction(isSuccess, playerCtlr, clearGrade));//, totalData));, (ulong)(playingTime * 1000f) //< 승리했을때에만 보스처리(승리했다면 무조건 보스를 잡았다는 뜻이므로) //if (isSuccess) //MissionManager.AllBossMonsterKillQuestCheck(1); }
public void SetVisualizing(bool ui, bool drawing) { m_IsVisualizingUI = ui; m_IsVisualizingDrawing = drawing; if (m_VisualWindow != null) { m_VisualWindow.SetActive(ui); } else if (ui) { m_VisualWindow = new HudWindow(Title); HudPanel.AddWindow(m_VisualWindow); } if ((ui || drawing) && m_Visual == null) { m_Visual = GetVisualFactory().GetOrCreateVisual(Topic); } if (m_Visual != null) { m_Visual.SetDrawingEnabled(drawing); if (m_VisualWindow != null) { m_VisualWindow.SetOnGUI(m_Visual.OnGUI); } } }
IEnumerator ResultAction(bool isSuccess, PlayerController playerCtlr) { yield return(new WaitForSeconds(2)); UIMgr.instance.UICamera.enabled = true; HudPanel.Hide(); UIMgr.GetUI("UIPanel/InGameBoardPanel").GetComponent <InGameBoardPanel>().Hide(); yield return(null); Debug.Log(string.Format("End {0} GetValue={1}/{2}", SpecialGameState.IsGoldStage ? "Gold":"Exp", GetTotalValue, MaxValue)); //if (!SpecialGameState.IsGoldStage) //{ // NetworkClient.instance.SendPMsgExpBattleCompleteC(StageId, isSuccess ? 1 : 0, (int)GetTotalValue); //} //else //{ // NetworkClient.instance.SendPMsgCoinBattleCompleteC(StageId, isSuccess ? 1 : 0, (int)GetTotalValue); //} //초기화. GetTotalValue = 0; //DropRewardDic.Clear(); //SpecialGameState.MonList.Clear(); OpenResultPanel(isSuccess); yield return(null); }
public void LoadSaveState(SaveState save) { if (m_TopicState.ServiceResponseTopic != null && save.Subtopic == MessageSubtopic.Response) { // this save actually applies to the response topic m_ServiceResponseTopic.LoadSaveState(save); return; } if (save.HasRect && save.Rect.width > 0 && save.Rect.height > 0) { m_VisualWindow = new HudWindow(Title, save.Rect); } else if (save.ShowWindow) { m_VisualWindow = new HudWindow(Title); } if (m_VisualWindow != null) { HudPanel.AddWindow(m_VisualWindow); } SetVisualizing(save.ShowWindow, save.ShowDrawing); }
void IHudTab.OnGUI(HudPanel hud) { m_TransformMenuScrollPosition = GUILayout.BeginScrollView(m_TransformMenuScrollPosition); GUI.changed = false; GUILayout.BeginHorizontal(GUILayout.Height(20)); GUILayout.Label("", GUILayout.Width(k_TFNameWidth)); ShowTFAxesDefault = DrawTFHeaderCheckbox(ShowTFAxesDefault, "Axes", (stream, check) => m_ShowAxes[stream] = check); ShowTFLinksDefault = DrawTFHeaderCheckbox(ShowTFLinksDefault, "Link", (stream, check) => m_ShowLinks[stream] = check); ShowTFNamesDefault = DrawTFHeaderCheckbox(ShowTFNamesDefault, "Lbl", (stream, check) => m_ShowNames[stream] = check); GUILayout.EndHorizontal(); bool globalChange = GUI.changed; // draw the root objects int numDrawn = 0; foreach (TFStream stream in TFSystem.instance.GetTransforms()) { if (stream.Parent == null) { numDrawn++; DrawTFStreamHierarchy(stream, 0, globalChange); } } if (numDrawn == 0) { GUILayout.Label("(No transform data received yet)"); } GUILayout.EndScrollView(); }
public override void EndGame(bool isSuccess) { base.EndGame(isSuccess); HudPanel.GameEnd(isSuccess); StartCoroutine(ResultAction(isSuccess)); }
protected override IEnumerator GameStartReady() { while (true) { #if UNITY_EDITOR if (GameObject.Find("SpawnTestManager")) { SingleGameState.IsMapLoad = true; } #endif if (SingleGameState.IsMapLoad) { break; } yield return(null); } SceneManager.instance.ShowLoadingTipPanel(false); float delay = 1f + Time.time; while (true) { if (delay < Time.time) { break; } yield return(null); } //SearchPathEffect(); //싱글게임 진입 플래그 만족이 아닐경우 Quest.QuestInfo info = QuestManager.instance.CheckSubQuest(QuestSubType.SINGLEGAMEPLAY, StageId); if (info == null) { IsQuestClear = false; GameStart(); } else if (0 < info.QuestTalkSceneID) { IsQuestClear = true; UIMgr.OpenMissionPanel(info.ID); HudPanel.Hide();//꺼놓는다. } DungeonTable.StageInfo stage = _LowDataMgr.instance.GetStageInfo(StageId); if (stage != null) { TimeLimit = stage.LimitTime; } else { Debug.LogError(" stage info is null!"); } }
public static HudScene Create(int session) { Log.Debug("Scenes", "Creating tutorial 4 scene for {0}", session); var scene = new HudScene { Session = session, Name = NAME }; var user = AWHT.Instance.GetUser(session); var lang = user.Language; var hudTagline = new HudPanel( Lang.Get(lang, "Tut4a"), Colors.White, new Metric { Rectangle = new Rectangle(-256, -100, 512, 64), Origin = HudOrigin.Bottom }, true); scene[HUD_TAGLINE] = hudTagline; var hudDiagramA = new HudPanel( new Texture { Name = "hud-tut4b.png" }, new Metric { Rectangle = new Rectangle(222, 32, 64, 128), Origin = HudOrigin.TopLeft }); hudDiagramA.MainHud.Flags |= HudFlag.Highlight; hudDiagramA.MainHud.Color = Colors.Red; scene["diagramA"] = hudDiagramA; var hudDiagramB = new HudPanel( new Texture { Name = "hud-tut4a.png" }, new Metric { Rectangle = new Rectangle(64, 0, 64, 128), Origin = HudOrigin.Center }); scene["diagramB"] = hudDiagramB; scene[HUD_BTN_NEXT] = HudPanel.CreateNext(lang); scene[HUD_BTN_PREV] = HudPanel.CreatePrev(lang); scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang); scene[HUD_BTN_LANG] = HudPanel.CreateLanguage(); scene[HUD_BTN_NEXT].Clicked += (s, x, y) => { scene.GotoScene(SceneEnd.Create(s)); }; scene[HUD_BTN_PREV].Clicked += (s, x, y) => { scene.GotoScene(SceneTut3.Create(s)); }; scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); }; scene[HUD_BTN_LANG].Clicked += (s, x, y) => { scene.GotoScene(SceneLanguage.Create(s)); }; scene.MinimizeHud = SceneCommon.CreateMinimizeButton(); return(scene); }
public void SetBossData(int daed, int x, int y, int revivalTime = 0) { _Boss.Daed = daed; _Boss.PosX = x; _Boss.PosY = y; _Boss.ReviveTime = revivalTime; HudPanel.AlertBoss(_Boss); }
public WaitingState(GameContext gameContext, LevelContext levelContext, PlayerShip playerShip, ShipsFormation shipsFormation, HudPanel hudPanel) { _gameContext = gameContext; _levelContext = levelContext; _playerShip = playerShip; _shipsFormation = shipsFormation; _hudPanel = hudPanel; }
public void Start() { TFSystem.GetOrCreateInstance().AddListener(OnChanged); HudPanel.RegisterTab(this, (int)HudTabOrdering.TF); if (color.a == 0) { color.a = 1; } }
/* * protected override void OnRemoveUnit(Unit removedUnit) * { * if (null == removedUnit || isEnd) * return; * * if (removedUnit is Pc && removedUnit.IsLeader) {//실패 * EndGame(false); * } * * if (SpawnPropList != null && SpawnPropList.Count <= 0) * EndGame(true); * } */ public override void EndGame(bool isSuccess) { base.EndGame(isSuccess); HudPanel.GameEnd(isSuccess, true); PlayerController playerCtlr = G_GameInfo.PlayerController; StartCoroutine(ResultAction(isSuccess, playerCtlr)); }
public void Start() { m_FillTexture = VisualizationUtils.MakeTexture(16, 16, new Color(0.125f, 0.19f, 0.25f)); m_Connection = ROSConnection.GetOrCreateInstance(); HudPanel.RegisterTab(this, (int)HudTabOrdering.Topics); HudPanel.RegisterTab(new VisualizationLayoutTab(this), (int)HudTabOrdering.Layout); LoadLayout(); m_Connection.ListenForTopics(OnNewTopic, notifyAllExistingTopics: true); }
public static HudScene Create(int session) { Log.Debug("Scenes", "Creating language selection scene for {0}", session); var scene = new HudScene { Session = session, Name = NAME }; /*var background = SceneCommon.CreateBackground(); * var b = 0; * foreach (var bg in background) * { * scene[HUD_BG + b] = bg; * b++; * }*/ var hudChoose = new HudPanel( "Select your language", Colors.White, new Metric { Rectangle = new Rectangle(-256, -128, 512, 64), Origin = HudOrigin.Center }, true); scene[HUD_CHOOSE] = hudChoose; var langs = Enum.GetNames(typeof(Languages)); for (var i = 0; i < 6; i++) { var left = i % 2 == 0 ? -300 : 44; var lang = langs[i]; var langLabel = Lang.Ini.Configs[lang].Get("Name"); var langButton = new HudPanel( langLabel, Colors.White, new Metric { Rectangle = new Rectangle(left, 64 * (i / 2), 256, 32), Origin = HudOrigin.Center, }, true); langButton.Clickable = true; langButton.Clicked += (s, x, y) => { Log.Fine("Language Scene", "Session {0} has chosen {1}", s, lang); AWHT.Instance.GetUser(s).Language = (Languages)Enum.Parse(typeof(Languages), lang); scene.GotoScene(SceneTut1.Create(s)); }; scene[lang] = langButton; } return(scene); }
public IntroState(GameSoundController soundController, HudPanel hudPanel, GameContext gameContext, ShipsFormation shipsFormation, TopPlayersStorage topPlayersStorage, LevelContext levelContext, PlayerShip playerShip) { _soundController = soundController; _hudPanel = hudPanel; _gameContext = gameContext; _shipsFormation = shipsFormation; _topPlayersStorage = topPlayersStorage; _levelContext = levelContext; _playerShip = playerShip; }
IEnumerator ResultAction(bool isSuccess, PlayerController playerCtlr) { yield return(new WaitForSeconds(2)); HudPanel.Hide(); UIMgr.GetUI("UIPanel/InGameBoardPanel").GetComponent <InGameBoardPanel>().Hide(); uint totalKillCount = _AchieveFightData.KillBossCount + _AchieveFightData.KillMonsterCount, totalDieCount = _AchieveFightData.DieCount; NetworkClient.instance.SendPMsgTowerBattleCompleteC(StageId, totalDieCount, totalKillCount, PlayTime, isSuccess); yield return(null); }
IEnumerator ResultAction(bool isSuccess) { //yield return new WaitForSeconds(1); UIMgr.instance.UICamera.enabled = true; HudPanel.Hide(); UIMgr.GetUI("UIPanel/InGameBoardPanel").GetComponent <InGameBoardPanel>().Hide(); NetworkClient.instance.SendPMsgArenaFightCompleteC(isSuccess); yield return(null); }
public override void EndGame(bool isSuccess) { base.EndGame(isSuccess); if (RaidGameState.IsTest) { SceneManager.instance.ActionEvent(_ACTION.GO_TOWN); RaidGameState.IsTest = false; return; } HudPanel.GameEnd(isSuccess); StartCoroutine(ResultAction(isSuccess)); }
IEnumerator RevivalCountDown(float sec) { HudPanel.SetActiveUI(false); HudPanel.SetCountDownActive(true); while (0 < sec) { int s = (int)sec; HudPanel.SetCountDown(s); yield return(new WaitForSeconds(1f)); sec -= 1; } HudPanel.SetActiveUI(true); HudPanel.SetCountDownActive(false); yield return(null); }
public override void EndGame(bool isSuccess) { base.EndGame(isSuccess); if (TowerGameState.IsTest) { SceneManager.instance.ActionEvent(_ACTION.GO_TOWN); TowerGameState.IsTest = false; return; } HudPanel.GameEnd(isSuccess, true); PlayerController playerCtlr = G_GameInfo.PlayerController; StartCoroutine(ResultAction(isSuccess, playerCtlr)); }
public void EndTutorial() { TempCoroutine.instance.FrameDelay(0.5f, () => { base.EndGame(true); UIMgr.instance.UICamera.enabled = false; HudPanel.GameEnd(true); //UIBasePanel basePanel = UIMgr.GetUIBasePanel("UIPopup/TutorialPopup"); //if (basePanel != null) // basePanel.Close(); SceneManager.instance.CurTutorial = TutorialType.INGAME; NetworkClient.instance.SendPMsgRoleGuideC((int)1); NetworkClient.instance.SendPMsgLoginOverC(); TutorialGameState.IsTutorial = false; }); }
protected override IEnumerator GameStartReady() { while (true) { if (ArenaGameState.IsMapLoad) { break; } yield return(null); } if (HudPanel == null) { while (HudPanel == null) { yield return(null); } } //yield return new WaitForSeconds(1f); ChangeLeader(0, false); SceneManager.instance.ShowLoadingTipPanel(false); CameraManager.instance.RtsCamera.Distance = 16f; HudPanel.StartEffCountDown(); yield return(new WaitForSeconds(3f)); //Fx_IN_countdown_02B번체 //Fx_IN_countdown_02G간체 if (SystemDefine.LocalEff.Equals("_B")) { UIHelper.CreateEffectInGame(HudPanel.transform, "Fx_IN_countdown_02B"); } else { UIHelper.CreateEffectInGame(HudPanel.transform, "Fx_IN_countdown_02G"); } yield return(new WaitForSeconds(1f)); //HudPanel.StartTweenScale(false); TimeLimit = _LowDataMgr.instance.GetEtcTableValue <float>(EtcID.PvPTime); GameStart(); }
public void SetFreefightReward(int honor, int coin, int exp, List <NetData.DropItem> item, bool firstEnter /*처음입장?*/) { _FreeDropReward.honor += honor; _FreeDropReward.coin += coin; _FreeDropReward.exp += exp; if (item != null) { _FreeDropReward.totalItemCnt += item.Count; //for (int i = 0; i < item.Count; i++) //{ // _FreeDropReward.totalItemCnt += item[i].Amount; //} } HudPanel.SetFreeFightReward(_FreeDropReward, firstEnter); }
public static HudScene Create(int session) { Log.Debug("Scenes", "Creating tutorial 1 scene for {0}", session); var scene = new HudScene { Session = session, Name = NAME }; var user = AWHT.Instance.GetUser(session); var lang = user.Language; var hudTagline = new HudPanel( Lang.Get(lang, "Tut1a"), Colors.White, new Metric { Rectangle = new Rectangle(-512, 64, 1024, 64), Origin = HudOrigin.Top }, true); scene[HUD_TAGLINE] = hudTagline; var hudDiagramA = new HudPanel( new Texture { Name = "hud-tut1a.png" }, new Metric { Rectangle = new Rectangle(-300, 0, 256, 128), Origin = HudOrigin.Center }); scene["diagramA"] = hudDiagramA; scene[HUD_BTN_NEXT] = HudPanel.CreateNext(lang); scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang); scene[HUD_BTN_LANG] = HudPanel.CreateLanguage(); scene[HUD_BTN_NEXT].Clicked += (s, x, y) => { scene.GotoScene(SceneTut2.Create(s)); }; scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); }; scene[HUD_BTN_LANG].Clicked += (s, x, y) => { scene.GotoScene(SceneLanguage.Create(s)); }; scene.MinimizeHud = SceneCommon.CreateMinimizeButton(); return(scene); }
void IHudTab.OnGUI(HudPanel hud) { // Save/Load layout files GUILayout.BeginHorizontal(); if (GUILayout.Button("Export layout")) { #if UNITY_EDITOR m_LayoutPath = EditorUtility.SaveFilePanel("Save Visualizations Settings", "", "RosHudLayout", "json"); #endif m_Topics.SaveLayout(m_LayoutPath); } if (GUILayout.Button("Import layout")) { #if UNITY_EDITOR m_LayoutPath = EditorUtility.OpenFilePanel("Select Visualizations Settings", "", "json"); #endif m_Topics.LoadLayout(m_LayoutPath); } GUILayout.EndHorizontal(); }
IEnumerator ResultAction(bool isSuccess) { yield return(new WaitForSeconds(1)); UIMgr.instance.UICamera.enabled = true; HudPanel.Hide(); UIMgr.GetUI("UIPanel/InGameBoardPanel").GetComponent <InGameBoardPanel>().Hide(); NetworkClient.instance.SendPMsgBossBattleCompleteC(StageId, isSuccess, NetData.instance._RewardData.GetExp); //if (!isSuccess) //{ // //< 모든 유닛을 숨김 // Unit[] allUnits = new Unit[characterMgr.allUnitDic.Values.Count]; // characterMgr.allUnitDic.Values.CopyTo(allUnits, 0); // foreach (Unit unit in allUnits) // unit.gameObject.SetActive(false); //} yield return(null); }
private void DrawAux(Graphics g, HudPanel panel, Rectangle rect) { switch (panel) { case HudPanel.NumericReadout: DrawNumericReadout(g, rect); break; case HudPanel.Battery: DrawBattery(g, rect); break; case HudPanel.Quadcopter: DrawQuadcopter(g, rect); break; case HudPanel.UserInput: DrawUserInput(g, rect); break; } }
public override void EndGame(bool isSuccess) { if (!IsStartGame)//이미 처리중 중복처리 막는다 { return; } base.EndGame(isSuccess); HudPanel.GameEnd(isSuccess); TempCoroutine.instance.FrameDelay(1f, () => { UIMgr.instance.UICamera.enabled = true; HudPanel.Hide(); UIMgr.GetUI("UIPanel/InGameBoardPanel").GetComponent <InGameBoardPanel>().Hide(); OverrideGameEnd(isSuccess); }); }
public static HudScene Create(int session) { Log.Debug("Scenes", "Creating end scene for {0}", session); var scene = new HudScene { Session = session, Name = NAME }; var user = AWHT.Instance.GetUser(session); var lang = user.Language; var hudTagline = new HudPanel( Lang.Get(lang, "End"), Colors.White, new Metric { Rectangle = new Rectangle(-512, -80, 1024, 64), Origin = HudOrigin.Center }, true); scene[HUD_TAGLINE] = hudTagline; scene[HUD_BTN_PREV] = HudPanel.CreatePrev(lang); scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang); scene[HUD_BTN_HIDE].Metrics = new Metric { Origin = HudOrigin.Center, Rectangle = new Rectangle(44, 16, 128, 32) }; scene[HUD_BTN_PREV].Metrics = new Metric { Origin = HudOrigin.Center, Rectangle = new Rectangle(-128 - 44, 16, 128, 32) }; scene[HUD_BTN_PREV].Clicked += (s, x, y) => { scene.GotoScene(SceneTut4.Create(s)); }; scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); }; scene.MinimizeHud = SceneCommon.CreateMinimizeButton(); return(scene); }