Client LuaCsForBarotrauma
AbilityConditionHasVelocity.cs
1
namespace
Barotrauma.Abilities
2
{
3
class
AbilityConditionHasVelocity
:
AbilityConditionDataless
4
{
5
private
readonly
float
velocity;
6
7
public
AbilityConditionHasVelocity
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
8
{
9
velocity = conditionElement.
GetAttributeFloat
(
"velocity"
, 0f);
10
}
11
12
protected
override
bool
MatchesConditionSpecific
()
13
{
14
return
character
.
AnimController
.
Collider
.
LinearVelocity
.LengthSquared() > velocity * velocity;
15
}
16
}
17
}
Barotrauma.Abilities.AbilityConditionDataless
Definition:
AbilityConditionDataless.cs:4
Barotrauma.Abilities.AbilityConditionHasVelocity
Definition:
AbilityConditionHasVelocity.cs:4
Barotrauma.Abilities.AbilityConditionHasVelocity.MatchesConditionSpecific
override bool MatchesConditionSpecific()
Definition:
AbilityConditionHasVelocity.cs:12
Barotrauma.Abilities.AbilityConditionHasVelocity.AbilityConditionHasVelocity
AbilityConditionHasVelocity(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionHasVelocity.cs:7
Barotrauma.Abilities.AbilityCondition.character
Character character
Definition:
AbilityCondition.cs:9
Barotrauma.Abilities.AbilityCondition.characterTalent
CharacterTalent characterTalent
Definition:
AbilityCondition.cs:8
Barotrauma.Character.AnimController
readonly AnimController AnimController
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:406
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeFloat
float GetAttributeFloat(string key, float def)
Barotrauma.PhysicsBody.LinearVelocity
Vector2 LinearVelocity
Definition:
BarotraumaShared/SharedSource/Physics/PhysicsBody.cs:276
Barotrauma.Ragdoll.Collider
PhysicsBody? Collider
Definition:
BarotraumaShared/SharedSource/Characters/Animation/Ragdoll.cs:145
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionDataless
AbilityConditionHasVelocity.cs
Generated by
1.9.1