Exemplo n.º 1
0
    public void TakeDmg(float _dmg, Vector3 _position)
    {
        enemyHealth -= _dmg;

        // Damage Pop text
        VFX_DmgPopUp.Create(_position, _dmg);
    }
    public static VFX_DmgPopUp Create(Vector3 _position, float _dmg)
    {
        GameObject   dmgPopUpTran = Instantiate(SYS_GameAssets.instance.m_DmgPopup, _position, Quaternion.identity);
        VFX_DmgPopUp dmgPopUp     = dmgPopUpTran.GetComponent <VFX_DmgPopUp>();

        dmgPopUp.Setup(_dmg);

        return(dmgPopUp);
    }