Barotrauma Client Doc
Barotrauma.PetBehavior Class Reference

Public Types

enum class  StatusIndicatorType { None , Happy , Sad , Hungry }
 

Public Member Functions

 PetBehavior (XElement element, EnemyAIController aiController)
 
StatusIndicatorType GetCurrentStatusIndicatorType ()
 
bool OnEat (Item item)
 
bool OnEat (Character character)
 
bool OnEat (Identifier tag)
 
void Play (Character player)
 
string GetTagName ()
 
void Update (float deltaTime)
 

Static Public Member Functions

static void SavePets (XElement petsElement)
 
static void LoadPets (XElement petsElement)
 

Properties

float Hunger [get, set]
 
float Happiness [get, set]
 
float UnhappyThreshold [get, set]
 At which point is the pet considered "unhappy" (playing unhappy sounds and showing the icon) More...
 
float HappyThreshold [get, set]
 At which point is the pet considered "happy" (playing happy sounds and showing the icon) More...
 
float MaxHappiness [get, set]
 
float HungryThreshold [get, set]
 At which point is the pet considered "hungry" (playing unhappy sounds and showing the icon) More...
 
float MaxHunger [get, set]
 
float HappinessDecreaseRate [get, set]
 
float HungerIncreaseRate [get, set]
 
float PlayForce [get, set]
 
float PlayTimer [get, set]
 
EnemyAIController AIController = null [get]
 
Character Owner [get, set]
 

Detailed Description

Definition at line 13 of file PetBehavior.cs.

Member Enumeration Documentation

◆ StatusIndicatorType

Enumerator
None 
Happy 
Sad 
Hungry 

Definition at line 15 of file PetBehavior.cs.

Constructor & Destructor Documentation

◆ PetBehavior()

Barotrauma.PetBehavior.PetBehavior ( XElement  element,
EnemyAIController  aiController 
)

Definition at line 178 of file PetBehavior.cs.

Member Function Documentation

◆ GetCurrentStatusIndicatorType()

StatusIndicatorType Barotrauma.PetBehavior.GetCurrentStatusIndicatorType ( )

Definition at line 229 of file PetBehavior.cs.

◆ GetTagName()

string Barotrauma.PetBehavior.GetTagName ( )

Definition at line 298 of file PetBehavior.cs.

◆ LoadPets()

static void Barotrauma.PetBehavior.LoadPets ( XElement  petsElement)
static

Definition at line 433 of file PetBehavior.cs.

◆ OnEat() [1/3]

bool Barotrauma.PetBehavior.OnEat ( Character  character)

Definition at line 247 of file PetBehavior.cs.

◆ OnEat() [2/3]

bool Barotrauma.PetBehavior.OnEat ( Identifier  tag)

Definition at line 267 of file PetBehavior.cs.

◆ OnEat() [3/3]

bool Barotrauma.PetBehavior.OnEat ( Item  item)

Definition at line 237 of file PetBehavior.cs.

◆ Play()

void Barotrauma.PetBehavior.Play ( Character  player)

Definition at line 284 of file PetBehavior.cs.

◆ SavePets()

static void Barotrauma.PetBehavior.SavePets ( XElement  petsElement)
static

Definition at line 398 of file PetBehavior.cs.

◆ Update()

void Barotrauma.PetBehavior.Update ( float  deltaTime)

Definition at line 315 of file PetBehavior.cs.

Property Documentation

◆ AIController

EnemyAIController Barotrauma.PetBehavior.AIController = null
get

Definition at line 64 of file PetBehavior.cs.

◆ Happiness

float Barotrauma.PetBehavior.Happiness
getset

Definition at line 31 of file PetBehavior.cs.

◆ HappinessDecreaseRate

float Barotrauma.PetBehavior.HappinessDecreaseRate
getset

Definition at line 56 of file PetBehavior.cs.

◆ HappyThreshold

float Barotrauma.PetBehavior.HappyThreshold
getset

At which point is the pet considered "happy" (playing happy sounds and showing the icon)

Definition at line 45 of file PetBehavior.cs.

◆ Hunger

float Barotrauma.PetBehavior.Hunger
getset

Definition at line 24 of file PetBehavior.cs.

◆ HungerIncreaseRate

float Barotrauma.PetBehavior.HungerIncreaseRate
getset

Definition at line 57 of file PetBehavior.cs.

◆ HungryThreshold

float Barotrauma.PetBehavior.HungryThreshold
getset

At which point is the pet considered "hungry" (playing unhappy sounds and showing the icon)

Definition at line 53 of file PetBehavior.cs.

◆ MaxHappiness

float Barotrauma.PetBehavior.MaxHappiness
getset

Definition at line 47 of file PetBehavior.cs.

◆ MaxHunger

float Barotrauma.PetBehavior.MaxHunger
getset

Definition at line 54 of file PetBehavior.cs.

◆ Owner

Character Barotrauma.PetBehavior.Owner
getset

Definition at line 66 of file PetBehavior.cs.

◆ PlayForce

float Barotrauma.PetBehavior.PlayForce
getset

Definition at line 59 of file PetBehavior.cs.

◆ PlayTimer

float Barotrauma.PetBehavior.PlayTimer
getset

Definition at line 61 of file PetBehavior.cs.

◆ UnhappyThreshold

float Barotrauma.PetBehavior.UnhappyThreshold
getset

At which point is the pet considered "unhappy" (playing unhappy sounds and showing the icon)

Definition at line 40 of file PetBehavior.cs.