private void Init(string tip) { imageObj = MonoBehaviour.Instantiate(Resources.Load("Tips/TipsImage")) as GameObject; imageObj.GetComponent<RectTransform>().SetParent(tipParent); imageObj.transform.localPosition = new Vector3(0,-100,0); image = imageObj.GetComponent<Image>(); imageforblack = image.transform.Find("for more black").GetComponent<Image>(); text = imageforblack.transform.Find("my lable").GetComponent<Text>(); text.text = tip; HOTween.Init(); TweenParms parms = new TweenParms(); parms.Prop("localPosition", new PlugVector3Y(50)); parms.Ease(EaseType.EaseOutCubic); parms.Delay(0.1f); parms.OnComplete(MyComplete); HOTween.To(image.rectTransform, 1.5f, parms); #region Legacy DoTween //DOTween.Init(); //Tweener tweener = image.rectTransform.DOMoveY(250f, 1f); //tweener.SetEase(Ease.Linear); //image.material.DOColor(Color.clear,1.5f); //text.material.DOColor(Color.clear, 1.5f); //tweener.OnComplete(MyComplete); #endregion }
private void Show() { GoodsItemVO vo = currSelectedVO; //todo:根据数据初始化整个详情 SetName(vo.name); SetOwn(vo.own); SetDetails(vo.description,vo.extraDescription); SetCost(vo.totalcost,vo.cout,vo.goodsCostType); Convert(); if (temp == null) { this.mTrans.localScale = new Vector3(0.1f, 0.1f, 0.1f); HOTween.Init(); parms = new TweenParms(); parms.Prop("localScale", new Vector3(1f, 1f, 1f)); parms.Ease(EaseType.EaseOutBack); parms.Delay(0.1f); parms.AutoKill(false); temp = HOTween.To(this.mTrans, 0.2f, parms); temp.intId = 1; } temp.PlayForward(); }
private void SetRefreshChoiceOpen() { refreshT.gameObject.SetActive(true); if (parms == null) { refreshT.localScale = new Vector3(0.1f, 0.1f, 0.1f); parms = new TweenParms(); parms.Prop("localScale", new Vector3(1f, 1f, 1f)); parms.Ease(EaseType.EaseOutBack); parms.Delay(0.1f); parms.AutoKill(false); temp = HOTween.To(refreshT, 0.2f, parms); } temp.PlayForward(); }
static TweenParms SetAttributes(NTweenAttributes attributes) { var tweenParms = new TweenParms (); if (attributes != null) { tweenParms.AutoKill (attributes.GetAutoKill ()); if (attributes.GetDelay () > 0) { tweenParms.Delay (attributes.GetDelay ()); } if (attributes.GetLoops () != 0) { tweenParms.Loops (attributes.GetLoops (), GetLoopType (attributes.GetLoopType ())); } if (attributes.GetEaseType () != NTweenEaseType.Linear) { tweenParms.Ease (GetEaseType (attributes.GetEaseType ())); } if (attributes.GetOnComplete () != null) { tweenParms.OnComplete (attributes.GetOnComplete ().Invoke); } if (attributes.GetOnPlay () != null) { tweenParms.OnStart (attributes.GetOnPlay ().Invoke); } if (attributes.GetOnUpdate () != null) { tweenParms.OnUpdate (attributes.GetOnUpdate ().Invoke); } } return tweenParms; }
private void Show() { //todo:根据数据初始化整个详情 if (currSelectedVO != null) { TitleText.text = currSelectedVO.title; DetailText.text = currSelectedVO.content; } //Convert(); if (temp == null) { this.mTrans.localScale = new Vector3(0.1f, 0.1f, 0.1f); HOTween.Init(); parms = new TweenParms(); parms.Prop("localScale", new Vector3(1f, 1f, 1f)); parms.Ease(EaseType.EaseOutBack); parms.Delay(0.1f); parms.AutoKill(false); temp = HOTween.To(this.mTrans, 0.2f, parms); temp.intId = 1; } temp.PlayForward(); }