Example #1
0
    IEnumerator MoveCardIntoDeck(GameObject aCard)
    {
        if (Vector3.Distance(aCard.transform.position, m_CreatureSkills[m_MemoriaCreature.m_Skills.Count].transform.position) < 1.9f)
        {
            m_MemoriaCreature.m_Skills.Add(m_MemoriaSkills[m_SkillBoardPointerPosition].m_ButtonSkill);
            InputManager.Instance.m_MovementControls.Enable();
            OnPop();
            m_Memoria.DestroyMemoria();
            yield break;
        }

        aCard.transform.position = Vector3.Lerp(aCard.transform.position,
                                                m_CreatureSkills[m_MemoriaCreature.m_Skills.Count].transform.position, m_CardMovementSpeed * Time.deltaTime);

        yield return(new WaitForEndOfFrame());

        StartCoroutine(MoveCardIntoDeck(aCard));
    }