Exemplo n.º 1
0
 private void InitDepthAndPosition()
 {
     for (int i = 0; i < 10; i++)
     {
         RelicsMove tab = new RelicsMove();
         if (i < 5)
         {
             tab.pos   = new Vector3(changeX * i, 0, 0);
             tab.scale = Vector3.one * (1 - changeScale * i);
             tab.depth = 500 - i * 100;
         }
         else if (i == 5)
         {
             tab.pos   = Vector3.zero;
             tab.scale = new Vector3(0.01f, 0.01f, 0.01f);
             tab.depth = 0;
         }
         else
         {
             tab.pos   = new Vector3(-changeX * (10 - i), 0, 0);
             tab.scale = Vector3.one * (1 - changeScale * (10 - i));
             tab.depth = (i - 5) * 100;
         }
         mMoves.Add(tab);
     }
 }
Exemplo n.º 2
0
 private void PlayMoveTween()
 {
     for (int i = 0; i < mCards.Count; i++)
     {
         int           index = mMoveList[i];
         RelicsMove    move  = mMoves[index];
         TweenPosition tp    = TweenPosition.Begin(mCards[i].btn, 0.3f, move.pos);
         TweenScale.Begin(mCards[i].btn, 0.3f, move.scale);
     }
     mCards[0].btn.GetComponent <TweenPosition>().SetOnFinished(new EventDelegate(OnMoveTweenFinished));
 }
Exemplo n.º 3
0
 private void ShowDepthAndPosition()
 {
     for (int i = 0; i < mCards.Count; i++)
     {
         RelicsCard card  = mCards[i];
         int        index = mMoveList[i];
         RelicsMove move  = mMoves[index];
         card.trans.localPosition = move.pos;
         card.trans.localScale    = move.scale;
         SortDepth(move.depth, card.trans);
     }
 }