public void GmoveXFode(GObject parent, float endValue, float fodeendvalue, float time, bool onoff) { if (onoff) { parent.visible = true; killtweener(movetw, parent.TweenMoveX(endValue, time), parent, onoff); killtweener(fodetw, parent.TweenFade(fodeendvalue, time), parent, onoff); } else { killtweener(movetw, parent.TweenMoveX(endValue, time), parent, onoff); killtweener(fodetw, parent.TweenFade(fodeendvalue, time), parent, onoff); //StartCoroutine(waitMove(time, () => { parent.visible = false;})); } }
// private void TweenMove(int index) // { // float c = curX2; // DOTween.To (() => c, x => c = x, index * -1100, 1f).OnUpdate (() => { // listxx.container.x = c; // }); // } private void OnRenderListXX(int index, GObject go) { // listxx.ch // Debug.LogError (index + " || "+listxx.GetChildIndex(go) + " || " +listxx.numItems + " || "+curIndex); // if (btn_xx.touchable) // return; // if ((index == (curIndex - 1) || index == (curIndex+1) || index == curIndex)&&addList[index] == 0) { // addList [index] = 1; // } else // return; GList list = go.asCom.GetChild("n14").asList; GTextField tex = go.asCom.GetChild("n11").asTextField; GButton btn = go.asCom.GetChild("n12").asButton; GTextField effort_lv = go.asCom.GetChild("n9").asTextField; GTextField benji = go.asCom.GetChild("n13").asTextField; GTextField dangqian = go.asCom.GetChild("n16").asTextField; GButton jianzhu = go.asCom.GetChild("n8").asButton; // GImage dangqianImg = go.asCom.GetChild ("n17").asImage; GImage n18 = go.asCom.GetChild("n18").asImage; // GComponent n19 = go.asCom.GetChild ("n19").asCom; GImage n20 = go.asCom.GetChild("n20").asImage; GImage n21 = go.asCom.GetChild("n21").asImage; // GTextField n23 = go.asCom.GetChild ("n23").asTextField; GImage n24 = go.asCom.GetChild("n24").asImage; GImage n25 = go.asCom.GetChild("n25").asImage; GComponent bg = go.asCom.GetChild("bg").asCom; // n23.text = (index + 1) + ""; btn.touchable = true; if (donghuaXX && index == beforeEff_Lv - 1) { dangqian.alpha = 0; effort_lv.alpha = 0; benji.alpha = 0; btn.alpha = 0; tex.alpha = 0; btn_esc.alpha = 0; // dangqianImg.alpha = 0; n18.alpha = 0; // n19.alpha = 0; n20.alpha = 0; n21.alpha = 0; // n23.alpha = 0; n24.alpha = 0; n25.alpha = 0; bg.alpha = 0; DOTween.Kill(this.GetChild("n30"), true); DOTween.Kill(this.GetChild("n31"), true); this.GetChild("n30").alpha = 0; this.GetChild("n31").alpha = 0; jianzhu.x = 400f; TimerManager.inst.Add(2f, 1, (float time) => { jianzhu.TweenMoveX(170f, 0.6f).OnComplete(() => { float c = 0; DOTween.To(() => c, x => c = x, 1, 0.3f).OnUpdate(() => { dangqian.alpha = c; effort_lv.alpha = c; benji.alpha = c; btn.alpha = c; tex.alpha = c; btn_esc.alpha = c; // dangqianImg.alpha = c; n18.alpha = c; // n19.alpha = c; n20.alpha = c; n21.alpha = c; // n23.alpha = c; n24.alpha = c; n25.alpha = c; bg.alpha = c; this.GetChild("n30").alpha = c; this.GetChild("n31").alpha = c; }).OnComplete(() => { EffectManager.inst.EffectAlpha(this.GetChild("n30").asImage, 0); EffectManager.inst.EffectAlpha(this.GetChild("n31").asImage, 0); }); }); }); } effort_lv.text = Tools.GetEffortName((index + 1)); //GuideManager tex.text = Tools.GetMessageById("23006"); if ((index + 1) == userModel.effort_lv) { benji.text = Tools.GetMessageById("23002"); if (isUP) { dangqian.text = Tools.GetMessageById("23004"); } else { dangqian.text = Tools.GetMessageById("23005"); } // dangqianImg.visible = true; } else { benji.text = Tools.GetMessageById("23003", new object[] { (index + 1) }); dangqian.text = ""; // dangqianImg.visible = false; } string iii = Tools.GetEffortBuildID("0" + (index + 1)); GameObject asd = EffectManager.inst.AddEffect(iii, iii, jianzhu.GetChild("n2").asGraph, null, false, 50, null, true); asd.transform.localScale *= 0.9f; // Debug.Log(asd.transform.localScale); if (userModel.effort_lv < (index + 1)) { EffectManager.inst.SetShaderSaturation(asd, -1); EffectManager.inst.StopAnimation(asd); } list.itemRenderer = (int _index, GObject _ggo) => { GObject _go = _ggo.asCom.GetChild("n0"); _go.data = _go.x; if (donghuaXX && index == beforeEff_Lv - 1) { _go.alpha = 0; TimerManager.inst.Add(2f, 1, (float time) => { float hh = 0; DOTween.To(() => hh, x => hh = x, 1f, 0.6f + (4f - (_index) % 4f) / 10f).OnUpdate(() => { _go.alpha = hh; }).OnComplete(() => { if ((list.numItems - 1) == _index && beforeEff_Lv == 2) { if (GuideManager.inst.Check("100:2")) { GuideManager.inst.Show(this); GuideManager.inst.onClick = OnClick; donghuaXX = false; } else { this.touchable = true; } } else { if (beforeEff_Lv != 2) { this.touchable = true; donghuaXX = false; } } }); _go.x -= (4 - (_index) % 4) * 30 + 100; _go.TweenMoveX(Convert.ToSingle(go.data), 0.8f).OnComplete(() => { _go.x = Convert.ToSingle(go.data); }); }); } else { _go.x = Convert.ToSingle(go.data); if (!donghuaXX) { this.touchable = true; } } GComponent iconBtn = _go.asCom; string dic = ((Dictionary <string, object>)(((List <object>)lisXXda [index]) [_index])) ["id"].ToString(); (_go as ComCard).SetData(dic, -1, 4); (_go as ComCard).SetText(Tools.GetMessageById(((Dictionary <string, object>)(((List <object>)lisXXda [index]) [_index])) ["name"].ToString())); iconBtn.RemoveEventListeners(); iconBtn.onClick.Add(() => { MediatorItemShipInfo2.CID = dic; ViewManager.inst.ShowView <MediatorItemShipInfo2> (true); }); }; if (((List <object>)lisXXda [index]) == null) { list.numItems = 0; } else { Tools.Sort(((List <object>)lisXXda [index]), new string[] { "index:int:0" }); list.numItems = ((List <object>)lisXXda [index]).Count; } // list.onClear.Add (()=>{ // if(list == null) // { // } // }); // int hang = list.numItems / 4 + (list.numItems % 4 == 0 ? 0 : 1); // if (hang < 3) // { // list.y = 151 + (196 / 2) * (3 - hang); // } // else // { // list.y = 177f; // } btn.RemoveEventListeners(); btn.onClick.Add(() => { MediatorEffortXX.curEffort = (index + 1); ViewManager.inst.ShowView <MediatorEffortXX> (); }); }