Beispiel #1
0
        public void OnDamageBlocked(DamageBlocked message)
        {
            var position = ((ITransform)Manager.GetComponent(message.Entity, TransformTypeId)).Position;

            ((FloatingTextSystem)Manager.GetSystem(FloatingTextSystem.TypeId))
            .Display("Blocked", position, Color.LightBlue, 0.5f);
        }
 private void CheckIfDamageBlocked()
 {
     if (_stamina._playerBlocked && _isAttacking == false)
     {
         DamageBlocked?.Invoke();
         if (_blockParticles != null)
         {
             _blockParticles.Play();
         }
         if (_blockSound != null)
         {
             AudioHelper.PlayClip2D(_blockSound, 1f);
         }
     }
     _stamina._playerBlocked = false;
 }