UnitController.LoseHealthBy C# (CSharp) Method

LoseHealthBy() public method

public LoseHealthBy ( int amount, float delay ) : void
amount int
delay float
return void
    public void LoseHealthBy(int amount,float delay)
    {
        m_health -= amount;
        StartCoroutine(DelayedHPBarUpdate(amount,delay));
        if(m_health <= 0){
            m_currentGrid.GetComponent<TnGAttribute>().m_unit = null;
            //death animation?
            m_engine.OnUnitDeath(gameObject);
        }
    }