Client LuaCsForBarotrauma
IDamageable.cs
2 using Microsoft.Xna.Framework;
3 
4 namespace Barotrauma
5 {
6  interface IDamageable
7  {
8  Vector2 SimPosition { get; }
9  Vector2 WorldPosition { get; }
10  float Health { get; }
11 
12  AttackResult AddDamage(Character attacker, Vector2 worldPosition, Attack attack, Vector2 impulseDirection, float deltaTime, bool playSound = true);
13 
14 
15  public readonly struct AttackEventData
16  {
17  public readonly ISpatialEntity Attacker;
18  public readonly IDamageable TargetEntity;
19  public readonly Limb TargetLimb;
20  public readonly Vector2 AttackSimPosition;
21 
22  public AttackEventData(ISpatialEntity attacker, IDamageable targetEntity, Limb targetLimb, Vector2 attackSimPosition)
23  {
24  Attacker = attacker;
25  TargetEntity = targetEntity;
26  TargetLimb = targetLimb;
27  AttackSimPosition = attackSimPosition;
28  }
29  }
30  }
31 }
Attacks are used to deal damage to characters, structures and items. They can be defined in the weapo...
AttackResult AddDamage(Character attacker, Vector2 worldPosition, Attack attack, Vector2 impulseDirection, float deltaTime, bool playSound=true)
readonly ISpatialEntity Attacker
Definition: IDamageable.cs:17
AttackEventData(ISpatialEntity attacker, IDamageable targetEntity, Limb targetLimb, Vector2 attackSimPosition)
Definition: IDamageable.cs:22