public void SetValue(int value) { this.value = value; if (value > max) { this.value = max; } GLoader img = null; for (int j = 0; j < list.Count; j++) { img = list [j]; if (j > this.value - 1) { img.url = Tools.GetResourceUrl("Image2:n_icon_chengjiu1_"); } else { if (j == value - 1) { img.scale = new Vector2(1.2f, 1f); img.TweenScale(new Vector2(0.8f, 1f), 0.1f).OnComplete(() => { img.TweenScale(new Vector2(1.1f, 1f), 0.1f).OnComplete(() => { img.TweenScale(new Vector2(1f, 1f), 0.1f); }); }); } img.url = Tools.GetResourceUrl("Image2:n_icon_chengjiu2_"); } } }
// void tw_a () //{ // TimerManager.inst.Add (0.040f, 0, tw_b); //} //void tw_b (float f) //{ // tw_a_n += 2; // if (tw_a_n > 360) // { // tw_a_n = 0; // } // rankImg.rotation += (float)Math.Cos ((double)(tw_a_n)) * 20; // tw_a_n -= 4; // if (tw_a_b) // { // rankImg.rotation = 0; // TimerManager.inst.Remove (tw_b); // } //} private void Effect4() { rankScoreBg.visible = true; switch (isRankUp(rankScoreEnd)) { case 0: rankImg.visible = true; mask.visible = true; rankImg.TweenMoveX(g3.x + 40, 0.5f).OnComplete(() => { }); //rankImg.TweenMoveY(g3.y + 20, 0.5f).OnComplete(() => // { // }); rankImg.TweenScale(new Vector2(2.418f, 2.4358f), 0.2f).OnComplete(() => { TimerManager.inst.Add(0.2f, 1, (float t1) => { Tools.AddColorFilter(rankImg); EffectManager.inst.SetFilterAdjustBrightness(rankImg, 1f, 0f, 1f); TimerManager.inst.Add(0.5f, 1, (float t) => { GameObject g1 = EffectManager.inst.AddPrefab(Config.EFFECT_HAPPY, g3); // GameObjectScaler.Scale (g1, 0.5f); g1.transform.localScale *= 0.5f; TimerManager.inst.Add(1f, 1, (float t2) => { this.initQueue.Next(); }); }); }); }); break; case 1: rankImg.visible = true; mask.visible = true; rankImg.TweenMoveX(g3.x + 40, 0.5f).OnComplete(() => { }); //rankImg.TweenMoveY(g3.y + 20, 0.5f).OnComplete(() => //{ //}); rankImg.TweenScale(new Vector2(2.418f, 2.4358f), 0.2f).OnComplete(() => { TimerManager.inst.Add(0.2f, 1, (float t1) => { Tools.AddColorFilter(rankImg); EffectManager.inst.SetFilterAdjustBrightness(rankImg, 1f, 0f, 1f); TimerManager.inst.Add(0.5f, 1, (float t) => { GameObject g = EffectManager.inst.AddPrefab(Config.EFFECT_GET_LOW, g3); g.transform.localScale *= 0.5f; TimerManager.inst.Add(1f, 1, (float t2) => { this.initQueue.Next(); }); }); }); }); break; case 2: TimerManager.inst.Add(0.2f, 1, (float t) => { this.initQueue.Next(); }); break; } }
private void GetReward(VoHttp vo) { float timessssss = 0.3f; if (!nowGift.ContainsKey(Config.ASSET_BODY)) { back = false; ViewManager.inst.ShowIcon(nowGift, () => { userModel.UpdateData(vo.data); back = true; }); } EffectManager.inst.SetFilterAdjustBrightness(moveGo, timessssss, 0f, 1f); moveGo.TweenScale(new Vector2(1.15f, 1.15f), timessssss).OnComplete(() => { EffectManager.inst.SetFilterAdjustBrightness(moveGo, timessssss, 1f, 0f); moveGo.TweenScale(new Vector2(0.7f, 0.7f), 0.4f); ball.width = moveGo.width; ball.height = moveGo.height; ball.x = moveGo.x; ball.y = moveGo.y; float c = 1; DOTween.To(() => c, x => c = x, 0, 0.4f).OnUpdate(() => { moveGo.alpha = c; }).OnComplete(() => { items.Remove(moveGo.asCom); this.RemoveChild(moveGo); MoveList(); }); ball.TweenScale(new Vector2(0.7f, 0.7f), 0.4f); ball.visible = true; ball.alpha = 0; float b = ball.width; DOTween.To(() => b, x => b = x, 100, 0.4f).OnUpdate(() => { ball.width = b; }); float d = ball.height; DOTween.To(() => d, x => d = x, 100, 0.4f).OnUpdate(() => { ball.height = d; }).OnComplete(() => { ball.TweenScale(new Vector2(0.3f, 0.3f), timessssss); }); float f = 0; DOTween.To(() => f, x => f = x, 1, 0.7f).OnUpdate(() => { ball.alpha = f; }).OnComplete(() => { EffectManager.inst.Bezier(ball, 0.4f, ball.xy, new Vector2(500f, -100f), new Vector2(pro.x - 30f + (pro.value * 47f), pro.y - 37f), () => { ball.visible = false; NetHttp.inst.Send(NetBase.HTTP_GETEFFORT, "", OnChangeEff); }); }); }); }