Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (!Run)
        {
            return;
        }

        if (m_Char.m_Events.MissingDamageComponent)
        {
            GiveDMG();
        }
        if (m_Char.m_Events.MissingStats)
        {
            GiveStats();
        }
        if (m_Char.m_Events.MissingDamageLogComponent)
        {
            m_Char.GiveLog(m_attLog);
        }

        if (PlayerInRange())
        {
            m_Char.Target(m_Target);
        }

        m_Char.Update();

        m_healthBar.GivePercent(m_Char.m_damage.GetDamagePercent());
    }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        if (m_Char.m_Events.MissingDamageComponent)
        {
            GiveDMG();
        }
        if (m_Char.m_Events.MissingStats)
        {
            GiveStats();
        }
        if (m_Char.m_Events.MissingDamageLogComponent)
        {
            m_Char.GiveLog(m_attLog);
        }

        m_Char.Update();

        if (m_Char.m_Events.MeleeAttack)
        {
            m_Sword.Swing();
            m_Char.m_Events.MeleeAttack = false;
        }

        m_healthBar.GivePercent(m_Char.m_damage.GetDamagePercent());
    }