Esempio n. 1
0
    private void FixedUpdate()
    {
        if (IsDying())
        {
            playerStats.AddExperience(xpToGive);
            eventSubscriber.Trigger(ennemyKilledEvent);
            Destroy(this.gameObject);
        }

        if (isSufferingDamage)
        {
            if (immunityDurationCounter > 0)
            {
                immunityDurationCounter -= Time.fixedDeltaTime;
            }
            else
            {
                isSufferingDamage = false;
            }
        }
    }