Пример #1
0
    IEnumerator EnumFunc_AddDamageAnim(float Delay)
    {
        ActorInfo kActorInfo = GameMgr.Inst.m_GameInfo.m_ActorInfo;
        EnemyInfo kEnemyInfo = GameMgr.Inst.m_GameInfo.m_EnemyInfo;

        kActorInfo.AccDamageInit(kEnemyInfo.m_Attack);

        Debug.Log("adssa");

        int curDamage = 0;

        while (curDamage < kActorInfo.m_AccDamage)
        {
            kActorInfo.m_HP -= 1;
            curDamage++;

            if (kActorInfo.m_HP <= 0)
            {
                m_Player.CheckPlayerDie();
                break;
            }

            yield return(new WaitForSeconds(Delay));
        }

        SetIsPlayADAnim(true);
        yield return(null);
    }