Example #1
0
 private void CreateIntPopup(int value)
 {
     TextPopup.CreateIntPopup(
         transform.position + new Vector3(0, 2, 0),
         value,
         TextAnimName.INCREMENTATION);
 }
 /// <summary>
 /// To be called when player has been healed. Removes incapacitation
 /// effects.
 /// </summary>
 protected override void ReactToHeal(int value)
 {
     _playerStats.IsIncapacitated = false;
     TextPopup.CreateIntPopup(
         transform.position + new Vector3(0, 2, 0),
         value,
         TextAnimName.DAMAGE);
 }
 /// <summary>
 /// To be called when player is hurt. Drops lifted objects and activates
 /// invulnerability.
 /// </summary>
 protected override void ReactToHurt(int value)
 {
     _playerController.DropLiftedObjects();
     if (!isInvulnerable)
     {
         StartCoroutine(ActivateInvulnerability());
     }
     TextPopup.CreateIntPopup(
         transform.position + new Vector3(0, 2, 0),
         value,
         TextAnimName.DAMAGE);
 }
Example #4
0
 /// <summary>
 /// To be called when the GameObject has been hurt. Activates
 /// invulnerability.
 /// </summary>
 protected virtual void ReactToHurt(int value)
 {
     if (!isInvulnerable)
     {
         StartCoroutine(ActivateInvulnerability());
     }
     TextPopup.CreateIntPopup(
         transform.position + new Vector3(0, 2, 0),
         value,
         TextAnimName.DAMAGE);
     if (damageParticleEffect)
     {
         damageParticleEffect.GetComponent <ParticleSystem>().Play();
     }
 }