AnimController

Barotrauma.AnimController

Functions

AddJoint(jointParams)

AddJoint

Parameters

  • jointParams JointParams

AddLimb(limb)

AddLimb

Parameters

  • limb Limb

AnimController(character, seed, ragdollParams)

AnimController

Parameters

ApplyPose(leftHandPos, rightHandPos, leftFootPos, rightFootPos, footMoveForce)

ApplyPose

Parameters

  • leftHandPos Microsoft.Xna.Framework.Vector2

  • rightHandPos Microsoft.Xna.Framework.Vector2

  • leftFootPos Microsoft.Xna.Framework.Vector2

  • rightFootPos Microsoft.Xna.Framework.Vector2

  • footMoveForce number

ApplyTestPose()

ApplyTestPose

DebugDraw(spriteBatch)

DebugDraw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

DragCharacter(target, deltaTime)

DragCharacter

Parameters

  • deltaTime number

DragWithRope()

DragWithRope

Draw(spriteBatch, cam)

Draw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

FindHull(worldPosition, setSubmarine)

FindHull

Parameters

  • worldPosition optional Microsoft.Xna.Framework.Vector2

  • setSubmarine bool

FindLowestLimb()

FindLowestLimb

Returns

  • Limb

Flip()

Flip

ForceRefreshFloorY()

ForceRefreshFloorY

GetAnimationParamsFromType(type)

GetAnimationParamsFromType

Parameters

  • type AnimationType

Returns

  • AnimationParams

GetCenterOfMass()

GetCenterOfMass

Returns

  • Microsoft.Xna.Framework.Vector2

GetColliderBottom()

GetColliderBottom

Returns

  • Microsoft.Xna.Framework.Vector2

GetCurrentSpeed(useMaxSpeed)

GetCurrentSpeed

Parameters

  • useMaxSpeed bool

Returns

  • number

GetDepthOffset()

GetDepthOffset

Returns

  • number

GetHashCode()

GetHashCode

Returns

  • number

GetHeightFromFloor()

GetHeightFromFloor

Returns

  • number

GetImpactDamage(impact, impactTolerance)

GetImpactDamage

Parameters

  • impact number

  • impactTolerance optional Single

Returns

  • number

GetLimb(limbType, excludeSevered, excludeLimbsWithSecondaryType, useSecondaryType)

GetLimb

Parameters

  • limbType LimbType

  • excludeSevered bool

  • excludeLimbsWithSecondaryType bool

  • useSecondaryType bool

Returns

  • Limb

GetMouthPosition()

GetMouthPosition

Returns

  • optional Microsoft.Xna.Framework.Vector2

GetSpeed(type)

GetSpeed

Parameters

  • type AnimationType

Returns

  • number

GetSurfaceY()

GetSurfaceY

Returns

  • number

GetType()

GetType

Returns

  • Type

Grab(rightHandPos, leftHandPos)

Grab

Parameters

  • rightHandPos Microsoft.Xna.Framework.Vector2

  • leftHandPos Microsoft.Xna.Framework.Vector2

HandIK(hand, pos, armTorque, handTorque, maxAngularVelocity)

HandIK

Parameters

  • hand Limb

  • pos Microsoft.Xna.Framework.Vector2

  • armTorque number

  • handTorque number

  • maxAngularVelocity number

HangWithRope()

HangWithRope

HideAndDisable(limbType, duration, ignoreCollisions)

HideAndDisable

Parameters

  • limbType LimbType

  • duration number

  • ignoreCollisions bool

HoldItem(deltaTime, item, handlePos, itemPos, aim, holdAngle, itemAngleRelativeToHoldAngle, aimMelee, targetPos)

HoldItem

Parameters

  • deltaTime number

  • item Item

  • handlePos Microsoft.Xna.Framework.Vector2[]

  • itemPos Microsoft.Xna.Framework.Vector2

  • aim bool

  • holdAngle number

  • itemAngleRelativeToHoldAngle number

  • aimMelee bool

  • targetPos optional Microsoft.Xna.Framework.Vector2

HoldToRope()

HoldToRope

LockFlipping(time)

LockFlipping

Parameters

  • time number

MoveLimb(limb, pos, amount, pullFromCenter)

MoveLimb

Parameters

  • limb Limb

  • pos Microsoft.Xna.Framework.Vector2

  • amount number

  • pullFromCenter bool

OnLimbCollision(f1, f2, contact)

OnLimbCollision

Parameters

  • f1 FarseerPhysics.Dynamics.Fixture

  • f2 FarseerPhysics.Dynamics.Fixture

  • contact FarseerPhysics.Dynamics.Contacts.Contact

Returns

  • bool

PlayImpactSound(limb)

PlayImpactSound

Parameters

  • limb Limb

Recreate(ragdollParams)

Recreate

Parameters

RecreateAndRespawn(ragdollParams)

RecreateAndRespawn

Parameters

ReleaseStuckLimbs()

ReleaseStuckLimbs

Remove()

Remove

RemoveLimb(limb)

RemoveLimb

Parameters

  • limb Limb

ResetJoints()

ResetJoints

ResetLimbs()

ResetLimbs

ResetPullJoints(condition)

ResetPullJoints

Parameters

  • condition function

ResetRagdoll()

ResetRagdoll

RestoreTemporarilyDisabled()

RestoreTemporarilyDisabled

SaveRagdoll(fileNameWithoutExtension)

SaveRagdoll

Parameters

  • fileNameWithoutExtension string

SetPosition(simPosition, lerp, ignorePlatforms, forceMainLimbToCollider, moveLatchers)

SetPosition

Parameters

  • simPosition Microsoft.Xna.Framework.Vector2

  • lerp bool

  • ignorePlatforms bool

  • forceMainLimbToCollider bool

  • moveLatchers bool

SeverLimbJoint(limbJoint)

SeverLimbJoint

Parameters

  • limbJoint LimbJoint

Returns

  • bool

StartClimbing()

StartClimbing

StartUsingItem()

StartUsingItem

StopClimbing()

StopClimbing

StopUsingItem()

StopUsingItem

SubtractMass(limb)

SubtractMass

Parameters

  • limb Limb

Teleport(moveAmount, velocityChange, detachProjectiles)

Teleport

Parameters

  • moveAmount Microsoft.Xna.Framework.Vector2

  • velocityChange Microsoft.Xna.Framework.Vector2

  • detachProjectiles bool

ToString()

ToString

Returns

TryGetCollider(index, collider)

TryGetCollider

Parameters

  • index number

  • collider PhysicsBody&

Returns

  • bool

TryLoadAnimation(animationType, file, animParams, throwErrors)

TryLoadAnimation

Parameters

  • animationType AnimationType

  • file Either

  • animParams AnimationParams&

  • throwErrors bool

Returns

  • bool

TryLoadTemporaryAnimation(animLoadInfo, throwErrors)

TryLoadTemporaryAnimation

Parameters

  • animLoadInfo AnimLoadInfo

  • throwErrors bool

Returns

  • bool

UpdateAnimations(deltaTime)

UpdateAnimations

Parameters

  • deltaTime number

UpdateRagdoll(deltaTime, cam)

UpdateRagdoll

Parameters

  • deltaTime number

  • cam Camera

UpdateUseItem(allowMovement, handWorldPos)

UpdateUseItem

Parameters

  • allowMovement bool

  • handWorldPos Microsoft.Xna.Framework.Vector2

Fields

AimSourcePos

AimSourcePos, field of type Microsoft.Xna.Framework.Vector2

  • AimSourcePos

AimSourceSimPos

AimSourceSimPos, field of type Microsoft.Xna.Framework.Vector2

  • AimSourceSimPos

AimSourceWorldPos

AimSourceWorldPos, field of type Microsoft.Xna.Framework.Vector2

  • AimSourceWorldPos

AllAnimParams

AllAnimParams, field of type table

  • AllAnimParams

Anim

Anim, field of type Animation

  • Anim

AnimationTestPose

AnimationTestPose, field of type bool

  • AnimationTestPose

ArmLength

ArmLength, field of type number

  • ArmLength

BodyInRest

BodyInRest, field of type bool

  • BodyInRest

CanEnterSubmarine

CanEnterSubmarine, field of type CanEnterSubmarine

  • CanEnterSubmarine

CanWalk

CanWalk, field of type bool

  • CanWalk

Character

Character, field of type Character

  • Character

Collider

Collider, field of type PhysicsBody

  • Collider

ColliderHeightFromFloor

ColliderHeightFromFloor, field of type number

  • ColliderHeightFromFloor

ColliderIndex

ColliderIndex, field of type number

  • ColliderIndex

CurrentAnimationParams

CurrentAnimationParams, field of type AnimationParams

  • CurrentAnimationParams

CurrentGroundedParams

CurrentGroundedParams, field of type GroundedMovementParams

  • CurrentGroundedParams

CurrentHull

CurrentHull, field of type Hull

  • CurrentHull

CurrentSwimParams

CurrentSwimParams, field of type SwimParams

  • CurrentSwimParams

Dir

Dir, field of type number

  • Dir

Direction

Direction, field of type Direction

  • Direction

Draggable

Draggable, field of type bool

  • Draggable

FlipLockTime

FlipLockTime, field of type number

  • FlipLockTime

FloorY

FloorY, field of type number

  • FloorY

ForceSelectAnimationType

ForceSelectAnimationType, field of type AnimationType

  • ForceSelectAnimationType

Frozen

Frozen, field of type bool

  • Frozen

HasMultipleLimbsOfSameType

HasMultipleLimbsOfSameType, field of type bool

  • HasMultipleLimbsOfSameType

HeadAngle

HeadAngle, field of type ?Single

  • HeadAngle

HeadInWater

HeadInWater, field of type bool

  • HeadInWater

HeadPosition

HeadPosition, field of type ?Single

  • HeadPosition

IgnorePlatforms

IgnorePlatforms, field of type bool

  • IgnorePlatforms

ImpactTolerance

ImpactTolerance, field of type number

  • ImpactTolerance

InWater

InWater, field of type bool

  • InWater

Invalid

Invalid, field of type bool

  • Invalid

IsAboveFloor

IsAboveFloor, field of type bool

  • IsAboveFloor

IsAiming

IsAiming, field of type bool

  • IsAiming

IsAimingMelee

IsAimingMelee, field of type bool

  • IsAimingMelee

IsClimbing

IsClimbing, field of type bool

  • IsClimbing

IsDraggedWithRope

IsDraggedWithRope, field of type bool

  • IsDraggedWithRope

IsFlipped

IsFlipped, field of type bool

  • IsFlipped

IsHangingWithRope

IsHangingWithRope, field of type bool

  • IsHangingWithRope

IsHoldingToRope

IsHoldingToRope, field of type bool

  • IsHoldingToRope

IsMovingBackwards

IsMovingBackwards, field of type bool

  • IsMovingBackwards

IsMovingFast

IsMovingFast, field of type bool

  • IsMovingFast

IsStuck

IsStuck, field of type bool

  • IsStuck

IsUsingItem

IsUsingItem, field of type bool

  • IsUsingItem

LeftHandIKPos

LeftHandIKPos, field of type Microsoft.Xna.Framework.Vector2

  • LeftHandIKPos

LimbJoints

LimbJoints, field of type LimbJoint[]

  • LimbJoints

Limbs

Limbs, field of type Limb[]

  • Limbs

MainLimb

MainLimb, field of type Limb

  • MainLimb

Mass

Mass, field of type number

  • Mass

OnGround

OnGround, field of type bool

  • OnGround

RagdollParams

RagdollParams, field of type RagdollParams

  • RagdollParams

RightHandIKPos

RightHandIKPos, field of type Microsoft.Xna.Framework.Vector2

  • RightHandIKPos

RunParams

RunParams, field of type GroundedMovementParams

  • RunParams

SimplePhysicsEnabled

SimplePhysicsEnabled, field of type bool

  • SimplePhysicsEnabled

SpriteDeformations

SpriteDeformations, field of type HashSet

  • SpriteDeformations

Stairs

Stairs, field of type Structure

  • Stairs

StepSize

StepSize, field of type ?Microsoft.Xna.Framework.Vector2

  • StepSize

SwimFastParams

SwimFastParams, field of type SwimParams

  • SwimFastParams

SwimSlowParams

SwimSlowParams, field of type SwimParams

  • SwimSlowParams

TargetDir

TargetDir, field of type Direction

  • TargetDir

TargetMovement

TargetMovement, field of type Microsoft.Xna.Framework.Vector2

  • TargetMovement

TorsoAngle

TorsoAngle, field of type ?Single

  • TorsoAngle

TorsoPosition

TorsoPosition, field of type ?Single

  • TorsoPosition

WalkParams

WalkParams, field of type GroundedMovementParams

  • WalkParams

WalkPos

WalkPos, field of type number

  • WalkPos

WorldPosition

WorldPosition, field of type Microsoft.Xna.Framework.Vector2

  • WorldPosition

forceNotStanding

forceNotStanding, field of type bool

  • forceNotStanding

forceStanding

forceStanding, field of type bool

  • forceStanding

movement

movement, field of type Microsoft.Xna.Framework.Vector2

  • movement