Esempio n. 1
0
        /// <summary>
        /// 开始移动
        /// </summary>
        public void startMove()
        {
            _startPos = tf.localPosition;
            _nextPos  = cardAnim.slot2Position(slotNext);
            eclapse   = 0.0f;
            moving    = true;

            if (slotNext == 0 && cardAnim.onStartEnterForegroundEvent != null)
            {
                cardAnim.onStartEnterForegroundEvent(tf.gameObject);
            }

            if (slotKey == 0 && cardAnim.onCardStartEnterBackgroundEvent != null)
            {
                cardAnim.onCardStartEnterBackgroundEvent(tf.gameObject);
            }

            if (((slotKey == cardAnim.leftUpperBound && slotNext == cardAnim.rightUpperBound) ||
                 (slotKey == cardAnim.rightUpperBound && slotNext == cardAnim.leftUpperBound)) &&
                cardAnim.onCardAxisSideStartChangeEvent != null
                )
            {
                cardAnim.onCardAxisSideStartChangeEvent(tf.gameObject);
            }
        }