Ejemplo n.º 1
0
    private IEnumerator WaitForAnimation(HonoTweenPosition.WaitInput input)
    {
        yield return(new WaitForSeconds(input.duration + this.resetAnchorDelay));

        Byte[] dialogIndexes = input.dialogIndexes;
        for (Int32 i = 0; i < (Int32)dialogIndexes.Length; i++)
        {
            Byte index = dialogIndexes[i];
            if (!(this.dialogWidgetList[(Int32)index] == (UnityEngine.Object)null))
            {
                if (input.tweenType == HonoTweenPosition.TweenType.OUT && this.deactiveAfterTweenOut)
                {
                    this.dialogList[(Int32)index].SetActive(false);
                }
                this.dialogWidgetList[(Int32)index].updateAnchors = this.updateAnchor[(Int32)index];
                this.dialogWidgetList[(Int32)index].SetAnchor(this.anchorTransform[(Int32)index]);
            }
        }
        this.busy = false;
        if (input.callBack != null)
        {
            input.callBack();
        }
        yield break;
    }
Ejemplo n.º 2
0
 public void TweenOut(Byte[] dialogIndexes, UIScene.SceneVoidDelegate callBack = null)
 {
     if (base.gameObject.activeInHierarchy && !this.busy)
     {
         this.busy = true;
         Single  num  = 0f;
         Vector3 from = Vector3.zero;
         Vector3 zero = Vector3.zero;
         for (Int32 i = 0; i < (Int32)dialogIndexes.Length; i++)
         {
             Byte b = dialogIndexes[i];
             from = this.stopedPositionList[(Int32)b];
             zero = this.animatedOutEndPosition;
             if (this.animatePositionType == HonoTweenPosition.AnimatePositionType.ABSOLUTE)
             {
                 from.x = this.stopedPositionList[(Int32)b].x + this.animatedInStartPosition.x;
                 zero.x = this.stopedPositionList[(Int32)b].x + this.animatedOutEndPosition.x;
                 zero.y = this.stopedPositionList[(Int32)b].y + this.animatedOutEndPosition.y;
             }
             else if (this.snapYPosition)
             {
                 zero.y = this.stopedPositionList[(Int32)b].y;
             }
             else
             {
                 zero.y = this.animatedOutEndPosition.y;
             }
             this.Animate(b, from, zero, this.delayList[(Int32)b]);
             if (num < this.delayList[(Int32)b])
             {
                 num = this.delayList[(Int32)b];
             }
         }
         HonoTweenPosition.WaitInput value = new HonoTweenPosition.WaitInput(dialogIndexes, this.duration + num, HonoTweenPosition.TweenType.OUT, callBack);
         base.StartCoroutine("WaitForAnimation", value);
     }
 }