Client LuaCsForBarotrauma
CauseOfDeath.cs
1
using
System;
2
3
namespace
Barotrauma
4
{
5
enum
CauseOfDeathType
6
{
7
Unknown
,
Pressure
,
Suffocation
,
Drowning
,
Affliction
,
Disconnected
8
}
9
10
class
CauseOfDeath
11
{
12
public
readonly
CauseOfDeathType
Type
;
13
public
readonly
AfflictionPrefab
Affliction
;
14
public
readonly
Character
Killer
;
15
public
readonly
Entity
DamageSource
;
16
17
public
CauseOfDeath
(
CauseOfDeathType
type,
AfflictionPrefab
affliction,
Character
killer,
Entity
damageSource)
18
{
19
if
(type ==
CauseOfDeathType
.Affliction && affliction ==
null
)
20
{
21
string
errorMsg =
"Invalid cause of death (the type of the cause of death was Affliction, but affliction was not specified).\n"
+ Environment.StackTrace.CleanupStackTrace();
22
DebugConsole.ThrowError(errorMsg);
23
GameAnalyticsManager.AddErrorEventOnce(
"InvalidCauseOfDeath"
, GameAnalyticsManager.ErrorSeverity.Error, errorMsg);
24
type =
CauseOfDeathType
.Unknown;
25
}
26
27
Type
= type;
28
Affliction
= affliction;
29
Killer
= killer;
30
DamageSource
= damageSource;
31
}
32
}
33
}
Barotrauma.Affliction
Definition:
Affliction.cs:11
Barotrauma.AfflictionPrefab
AfflictionPrefab is a prefab that defines a type of affliction that can be applied to a character....
Definition:
AfflictionPrefab.cs:207
Barotrauma.CauseOfDeath
Definition:
CauseOfDeath.cs:11
Barotrauma.CauseOfDeath.Killer
readonly Character Killer
Definition:
CauseOfDeath.cs:14
Barotrauma.CauseOfDeath.Affliction
readonly AfflictionPrefab Affliction
Definition:
CauseOfDeath.cs:13
Barotrauma.CauseOfDeath.Type
readonly CauseOfDeathType Type
Definition:
CauseOfDeath.cs:12
Barotrauma.CauseOfDeath.DamageSource
readonly Entity DamageSource
Definition:
CauseOfDeath.cs:15
Barotrauma.CauseOfDeath.CauseOfDeath
CauseOfDeath(CauseOfDeathType type, AfflictionPrefab affliction, Character killer, Entity damageSource)
Definition:
CauseOfDeath.cs:17
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Entity
Definition:
Entity.cs:13
Barotrauma
Definition:
AchievementManager.cs:12
Barotrauma.CauseOfDeathType
CauseOfDeathType
Definition:
CauseOfDeath.cs:6
Barotrauma.CauseOfDeathType.Suffocation
@ Suffocation
Barotrauma.CauseOfDeathType.Drowning
@ Drowning
Barotrauma.CauseOfDeathType.Unknown
@ Unknown
Barotrauma.CauseOfDeathType.Pressure
@ Pressure
Barotrauma.CauseOfDeathType.Disconnected
@ Disconnected
Barotrauma
BarotraumaShared
SharedSource
Characters
CauseOfDeath.cs
Generated by
1.9.1