Beispiel #1
0
        private IEnumerator ShowPlaying(ICastableStatus item, CastableDragNDropElement dnd, CellObject cell)
        {
            dnd.get_gameObject().SetActive(true);
            CastHighlight cellHighlight = m_factory.CreateCastHighlight(item, cell.highlight.get_transform());
            Vector3       worldPosition = FightUIRework.WorldToUIWorld(cell.highlight.get_transform().get_parent().get_position());
            Tween         tween         = dnd.PlayCastImmediate(worldPosition, m_fightUICanvas.get_transform());

            while (tween.get_active() && !TweenExtensions.IsComplete(tween))
            {
                yield return(null);
            }
            yield return((object)new WaitForTime(m_castingModeParameters.opponentPlayingDuration));

            m_factory.DestroyCellHighlight(cellHighlight);
            yield return((object)new WaitForTime(m_castingModeParameters.opponentCastPlayingDuration));

            Tween endCastImmediate = dnd.EndCastImmediate();

            while (endCastImmediate.get_active() && !TweenExtensions.IsComplete(endCastImmediate))
            {
                yield return(null);
            }
            dnd.get_gameObject().SetActive(false);
        }