void Update() { // if(isDragging){ // Debug.Log("y is "+mScrollView.transform.localPosition.y); // -53f; if ((mScrollView.transform.localPosition.y) > (-72f + (UtilMgr.GetScaledPositionY() * 2f))) { Vector3 pos = new Vector3(0, (-72f + (UtilMgr.GetScaledPositionY() * 2f)), 0); mScrollView.transform.localPosition = pos; Vector2 offset = new Vector2(0, -(-72f + UtilMgr.GetScaledPositionY())); mScrollView.GetComponent <UIPanel>().clipOffset = offset; } // } if (mTimeOut) { if (backCheck) { //backCheck = false; } //if(UtilMgr.HasBackEvent) //UtilMgr.RunAllBackEvents(); // UtilMgr.RemoveBackEvent(); return; } CalcTime(); }
// Use this for initialization new void Start() { base.Start(); if (UtilMgr.IsMLB()) { transform.FindChild("SprTitle").FindChild("SprK").gameObject.SetActive(false); } else { transform.FindChild("SprTitle").FindChild("SprK").gameObject.SetActive(true); } transform.FindChild("Terms").gameObject.SetActive(false); transform.FindChild("RegisterUsername").gameObject.SetActive(false); transform.FindChild("RegisterUsername").localPosition = new Vector3(0f, UtilMgr.GetScaledPositionY()); // if(UtilMgr.IsMLB()) // transform.FindChild("SprTitle").GetComponent<UISprite>().spriteName = "logo_title1"; if (mNick != null) { Debug.Log("Nick is " + mNick); Login(); return; } mVersionEvent = new CheckVersionEvent(new EventDelegate(ReceivedVersion)); // transform.FindChild("Terms").GetComponent<Terms>().Init(); NetMgr.CheckVersion(mVersionEvent, false); }
// Use this for initialization void Start() { //기기별 사이즈 대응 if (name == "Batting") { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2f); if (GetComponent <BattingCommander>() == null) { transform.localPosition -= new Vector3(0, (UtilMgr.GetScaledPositionY())); } } else if (name == "Bot") { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2f); transform.FindChild("BtnPost").FindChild("TF_Post").localPosition -= new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2); transform.FindChild("Challenge").FindChild("Scroll View").localPosition -= new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2); } else if (name == "BtnClose") { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2f); } else if (name == "RankReward") { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY())); } else if (name == "Gift") { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2f); } else { transform.localPosition += new Vector3(0, (UtilMgr.GetScaledPositionY()) * 2f); } }
// Use this for initialization void Start() { //Debug.Log ("Screen.height : " + (float)Screen.width/(float)Screen.height); this.transform.localPosition += new Vector3(0, UtilMgr.GetScaledPositionY(), 0); UtilMgr.ResizeList(gameObject); }
// Use this for initialization void Start() { // UIButton btn = GetComponent<UIButton>(); // if(btn != null){ Vector3 pos = transform.localPosition; pos.y += UtilMgr.GetScaledPositionY() * 2; transform.localPosition = pos; // } }
void Start() { transform.FindChild("Camera").transform.localPosition = new Vector3(0, UtilMgr.GetScaledPositionY(), 0); Screen.sleepTimeout = SleepTimeout.NeverSleep; #if (UNITY_EDITOR) #elif (UNITY_ANDROID) #else // iPhoneSettings.screenCanDarken = false; #endif }
public void Start() { Vector3 pos = transform.localPosition; pos.y += UtilMgr.GetScaledPositionY(); transform.localPosition = pos; Rank = new GetGameParticipantRankingEvent(new EventDelegate(this, "SetRank")); NetMgr.GetGameParticipantRanking(Rank); }
public static void ResizeList(GameObject go) { Vector3 offset3 = go.transform.localPosition; offset3.y += UtilMgr.GetScaledPositionY(); go.transform.localPosition = new Vector3(0, offset3.y, 0); Vector4 offset4 = go.GetComponent <UIPanel> ().baseClipRegion; offset4.w -= UtilMgr.GetScaledPositionY() * 2; go.GetComponent <UIPanel> ().baseClipRegion = new Vector4(0, 0, 720f, offset4.w); }
// public string Base64Decode(string base64EncodedData) { // var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData); // return System.Text.Encoding.UTF8.GetString(base64EncodedBytes); // } // Use this for initialization void Awake() { transform.root.FindChild("Camera").localPosition = new Vector3(0, UtilMgr.GetScaledPositionY(), 0); //최초 실행시 초기화 관련 // if (UserMgr.ContestStatus == 2) { // transform.FindChild("Top").FindChild("Preset").FindChild("Label").GetComponent<UILabel>().text = "라이브"; // } MenuStatus = 1; for (int i = 0; i < GetComponent <LobbyTopCommander>().mTopMenuName.Length; i++) { transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[i]).FindChild("Bar").gameObject.SetActive(false); transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[i]).FindChild("Label").GetComponent <UILabel>().color = new Color(1, 1, 1, 0.5f); transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[i]).FindChild("Num").GetComponent <UILabel>().color = new Color(1, 1, 1, 0.5f); } transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[0]).FindChild("Bar").gameObject.SetActive(true); transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[0]).FindChild("Label").GetComponent <UILabel>().color = new Color(1, 1, 1, 1); transform.FindChild("Top").FindChild(GetComponent <LobbyTopCommander>().mTopMenuName[0]).FindChild("Num").GetComponent <UILabel>().color = new Color(1, 1, 1, 1); for (int i = 0; i < GetComponent <LobbyAddSub>().SubMenuName.Length; i++) { // transform.FindChild("Top").FindChild("Sub").FindChild(GetComponent<LobbyAddSub>().SubMenuName[i]).FindChild("Label") // .FindChild(GetComponent<LobbyAddSub>().SubMenuName[i]+"Box").FindChild("Menu 0"). // gameObject.SetActive(true); // transform.FindChild("Top").FindChild("Sub").FindChild(GetComponent<LobbyAddSub>().SubMenuName[i]).FindChild("Label") // .FindChild(GetComponent<LobbyAddSub>().SubMenuName[i]+"Box").FindChild("Menu 0"). // gameObject.SetActive(false); transform.FindChild("Top").FindChild("Sub").FindChild(GetComponent <LobbyAddSub>().SubMenuName[i]).FindChild( GetComponent <LobbyAddSub>().SubMenuName[i] + "Box").gameObject.SetActive(false); } if (transform.FindChild("Top").FindChild("Sub").FindChild("People").FindChild("PeopleBox").FindChild("Menu 0").FindChild("Arrow") != null) { transform.FindChild("Top").FindChild("Sub").FindChild("People").FindChild("PeopleBox").FindChild("Menu 0").FindChild("Arrow"). GetComponent <UISprite>().color = Color.yellow; transform.FindChild("Top").FindChild("Sub").FindChild("People").FindChild("PeopleBox").FindChild("Menu 0").FindChild("white").gameObject .SetActive(true); transform.FindChild("Top").FindChild("Sub").FindChild("People").FindChild("PeopleBox").FindChild("Menu 0").FindChild("yellow").gameObject .SetActive(true); } transform.FindChild("Top").FindChild("Sub").FindChild("BG_B").gameObject.SetActive(false); transform.FindChild("Top").FindChild("Sub").gameObject.SetActive(false); transform.FindChild("Gift").gameObject.SetActive(true); transform.FindChild("Gift").FindChild("GiftButton").GetComponent <Gift> ().Off(); transform.FindChild("Gift").FindChild("GiftButton").GetComponent <Gift> ().Button(); GetComponent <LobbyNCCommander> ().CreateCItem(); transform.FindChild("Nomal Contest").gameObject.SetActive(true); transform.FindChild("PreSet Contest").GetComponent <PresetContestCommander> ().CreatItem(); transform.FindChild("PreSet Contest").gameObject.SetActive(false); transform.parent.FindChild("GameInfo").gameObject.SetActive(false); LobbyBotCommander.mBtnState = LobbyBotCommander.BtmState.Main; //접속 보상 , 컨테스트 보상 체크 CheckFirst(); }
public static void ResizeList(GameObject go) { try{ Vector3 offset3 = go.transform.localPosition; offset3.y += UtilMgr.GetScaledPositionY(); go.transform.localPosition = new Vector3(offset3.x, offset3.y, offset3.z); Vector4 offset4 = go.GetComponent <UIPanel> ().baseClipRegion; offset4.w -= UtilMgr.GetScaledPositionY() * 2; go.GetComponent <UIPanel> ().baseClipRegion = new Vector4(offset4.x, offset4.y, offset4.z, offset4.w); }catch { } }
// Use this for initialization void Start() { mContainerBtns = transform.FindChild("ContainerBtns"); mContainerBtns.localPosition = new Vector3(0, UtilMgr.GetScaledPositionY() * 2f, 0); UtilMgr.ResizeList(transform.FindChild("ListTimeline").gameObject); transform.FindChild("ListTimeline").GetComponent <UIScrollView> ().ResetPosition(); // Vector3 offset = transform.FindChild ("ListTimeline").localPosition; // offset.y += UtilMgr.GetScaledPositionY () ; // transform.FindChild ("ListTimeline").localPosition = new Vector3 (0, offset.y, 0); // transform.FindChild ("ListTimeline").GetComponent<UIPanel> ().baseClipRegion = new Vector4 (0, 0, 720f, 690f - UtilMgr.GetScaledPositionY ()*2); CloseMenu(); }
public void Init() { transform.FindChild("ContainerBtns").localPosition = new Vector3(0, UtilMgr.GetScaledPositionY() * 2, 0); transform.FindChild("ContainerBtns").gameObject.SetActive(false); transform.FindChild("WindowEmail").gameObject.SetActive(false); transform.FindChild("FormJoin").gameObject.SetActive(false); transform.FindChild("ContainerBtns").gameObject.SetActive(false); transform.FindChild("SelectTeam").gameObject.SetActive(false); transform.FindChild("SprLogo").gameObject.SetActive(true); CheckPreference(); }
public void Init(QuizInfo quizInfo) { Debug.Log("Init"); if (quizInfo != null) { transform.parent.FindChild("TF_Highlight").FindChild("MatchPlaying").FindChild("ListHighlight").FindChild("Label").gameObject.SetActive(false); if (!transform.parent.FindChild("GameObject").FindChild("TF_Landing").FindChild("Scroll View").FindChild("Playing").gameObject.activeSelf) { ScriptMainTop.LandingState = 2; transform.parent.FindChild("GameObject").FindChild("TF_Landing").GetComponent <LandingManager> ().Start(); } mListJoin.Clear(); // quizInfo = quizInfo; SetHitter(quizInfo); Debug.Log("Hitter"); SetPitcher(); Debug.Log("Pitcher"); //SetBases (); Debug.Log("Bases"); SetBtns(); Debug.Log("Btns"); mSprBetting.SetActive(false); mStartTime = System.DateTime.Now.ToFileTime(); mTimeOut = false; backCheck = true; // mStartSec = System.DateTime.Now.Second; // mStartMilSec = System.DateTime.Now.Millisecond / 10; TweenAlpha.Begin(mBatting, 0f, 0f); TweenAlpha.Begin(mBatting, 1f, 1.0f); mSpark1.SetActive(false); mSpark2.SetActive(false); mSprBetting.SetActive(false); mBtnBatter.GetComponent <ScriptBettingCard> ().Init(); mBtnPitcher.GetComponent <ScriptBettingCard> ().Init(); mBtnStrategy.GetComponent <ScriptBettingCard> ().Init(); mScrollView.transform.localPosition = new Vector3(0, -72f, 0); mScrollView.GetComponent <UIPanel> ().clipOffset = new Vector2(0, UtilMgr.GetScaledPositionY()); } }
void InitAnalysis() { if (mSeasonEvent.Response.data == null) { return; } Transform tf = transform.FindChild("Body").FindChild("Changeables").FindChild("Analysis"); tf.gameObject.SetActive(true); // MeshFilter meshFilter = this.gameObject.AddComponent<MeshFilter>(); // MeshRenderer meshRenderer = this.gameObject.AddComponent<MeshRenderer>(); // Mesh mesh = new Mesh(); // // //정점 설정 // mesh.vertices = new Vector3[] // { // new Vector3(-1, 0, 0), new Vector3(-0.2f, 0.5f, 0), new Vector3(0.4f, 0.7f, 0), // new Vector3(1, 0, 0), new Vector3(0, -0.5f, 0) // }; // // //UV 설정 // mesh.uv = new Vector2[] // { // new Vector2(0.0f, 1.0f), new Vector2(0.5f, 1.0f), new Vector2(1.0f, 0.5f), // new Vector2(0.0f, 0.0f), new Vector2(1.0f, 0.0f) // }; // // //삼각형 그리는 순서 설정 // mesh.triangles = new int[]{0,1,2,2,3,0,0,3,4}; // mesh.RecalculateNormals(); // meshFilter.mesh = mesh; // tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").FindChild("Serires").FindChild("Series1") // .GetComponent<WMG_Series>().pointValues // int heightDiff = 1280 - Screen.height; // Debug.Log("RatioY is "+ UtilMgr.GetScaledPositionY()); // float rePos = * UtilMgr.GetScaledPositionY(); tf.FindChild("Radar").FindChild("Canvas").FindChild("RadarGraph").GetComponent <RectTransform>() .localPosition = new Vector3(0, -(GraphRatioValue * UtilMgr.GetScaledPositionY()), 0); tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").GetComponent <RectTransform>() .localPosition = new Vector3(171000f, (114000f - (GraphRatioValue * UtilMgr.GetScaledPositionY())), 0); tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").FindChild("Series").FindChild("Series1") .GetComponent <WMG_Series>().pointValues.Clear(); // tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").FindChild("Series").FindChild("Series1") // .GetComponent<WMG_Series>().pointValues.Insert(0, new Vector2(mPlayerInfo.fppg, 0)); if (mGameEvent.Response.data != null && mGameEvent.Response.data.Count > 1) { int count = 0; for (int i = mGameEvent.Response.data.Count - 1; i >= 0; i--, count++) { if (count > 9) { break; } float fp = float.Parse(mGameEvent.Response.data[i].FP); float diff = fp - mPlayerInfo.fppg; diff = diff > 10f ? 10f : diff < -10f ? -10f : diff; tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").FindChild("Series").FindChild("Series1") .GetComponent <WMG_Series>().pointValues.Add(new Vector2(0, diff)); } } tf.FindChild("Radar").FindChild("Canvas").FindChild("LineGraph").GetComponent <WMG_Axis_Graph>().SeriesChanged(true); mPlayerGraphData = null; mAvgGraphData = null; if (mPlayerInfo.positionNo == 1) { tf.FindChild("Radar").FindChild("LblContact").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrStamina"); tf.FindChild("Radar").FindChild("LblSpeed").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrBallPower"); tf.FindChild("Radar").FindChild("LblBattingEye").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrControl"); tf.FindChild("Radar").FindChild("LblConcentration").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrCrisisManagement"); tf.FindChild("Radar").FindChild("LblPower").GetComponent <UILabel>().text = UtilMgr.GetLocalText("StrGameManagement"); } else { tf.FindChild("Radar").FindChild("LblContact").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblContact"); tf.FindChild("Radar").FindChild("LblSpeed").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblRunningSpeed"); tf.FindChild("Radar").FindChild("LblBattingEye").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblBattingEye"); tf.FindChild("Radar").FindChild("LblConcentration").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblConcentration"); tf.FindChild("Radar").FindChild("LblPower").GetComponent <UILabel>().text = UtilMgr.GetLocalText("LblPower"); } mAvgGraphData = GetGraphData(mPlayerInfo, mSeasonEvent.Response.data.statsAvg); mPlayerGraphData = GetGraphData(mPlayerInfo, mSeasonEvent.Response.data.graph); // float value = 100f; // mAvgGraphData = new List<float>(); // mPlayerGraphData = new List<float>(); // mAvgGraphData.Add(value);mAvgGraphData.Add(value);mAvgGraphData.Add(value);mAvgGraphData.Add(value);mAvgGraphData.Add(value); // mPlayerGraphData.Add(10f);mPlayerGraphData.Add(10f);mPlayerGraphData.Add(10f);mPlayerGraphData.Add(10f);mPlayerGraphData.Add(10f); string[] names; string[] values; if (IsPitcher) { names = new string[] { "W", "L", "SV", "IP", "ERA", "PH", "ER", "BB", "SO", "PHR", "WHIP", "PBAA" }; values = new string[] { mSeasonEvent.Response.data.stats.W, mSeasonEvent.Response.data.stats.L, mSeasonEvent.Response.data.stats.SV, mSeasonEvent.Response.data.stats.IP, mSeasonEvent.Response.data.stats.ERA, mSeasonEvent.Response.data.stats.PH, mSeasonEvent.Response.data.stats.ER, mSeasonEvent.Response.data.stats.BB, mSeasonEvent.Response.data.stats.SO, mSeasonEvent.Response.data.stats.PHR, mSeasonEvent.Response.data.stats.WHIP, mSeasonEvent.Response.data.stats.PBAA }; } else { names = new string[] { "AVG", "HR", "RBI", "R", "H", "OBP", "SLG", "OPS", "SB", "CS", "BB", "HBP" }; values = new string[] { mSeasonEvent.Response.data.stats.AVG, mSeasonEvent.Response.data.stats.HR, mSeasonEvent.Response.data.stats.RBI, mSeasonEvent.Response.data.stats.R, mSeasonEvent.Response.data.stats.H, mSeasonEvent.Response.data.stats.OBP, mSeasonEvent.Response.data.stats.SLG, mSeasonEvent.Response.data.stats.OPS, mSeasonEvent.Response.data.stats.SB, mSeasonEvent.Response.data.stats.CS, mSeasonEvent.Response.data.stats.BB, mSeasonEvent.Response.data.stats.HBP }; } for (int i = 0; i < 12; i++) { tf.transform.FindChild("Season").FindChild("" + (i + 1)).FindChild("Name").GetComponent <UILabel>().text = names[i]; tf.transform.FindChild("Season").FindChild("" + (i + 1)).FindChild("Value").GetComponent <UILabel>().text = values[i]; } }