Ejemplo n.º 1
0
    public override void TakePhysicalDamage(float amount, Entity source)
    {
        float damage = DamageCalculator.CalculatePhisicalDamage(source, this);

        string sourceName = "";

        if (CompareTag("Player"))
        {
            sourceName = "The player";
        }
        else
        {
            sourceName = "<color=red>" + name + "</color>";
        }

        GameLogger.Log(string.Format("{0} takes <color=red>{1} points of damage</color>!", sourceName, damage));
        Health -= Mathf.Floor(damage);
    }