tModLoader v2024.09
A mod to make and play Terraria mods
PlayerEyeHelper Struct Reference

Public Types

enum  EyeFrame { EyeOpen , EyeHalfClosed , EyeClosed }
 
enum  EyeState {
  NormalBlinking , InStorm , InBed , JustTookDamage ,
  IsModeratelyDamaged , IsBlind , IsTipsy , IsPoisoned
}
 

Public Member Functions

void BlinkBecausePlayerGotHurt ()
 
void SwitchToState (EyeState newState, bool resetStateTimerEvenIfAlreadyInState=false)
 
void Update (Player player)
 

Properties

EyeFrame CurrentEyeFrame [get, set]
 
EyeState CurrentEyeState [get, set]
 
int EyeFrameToShow [get]
 
int TimeInState [get, set]
 

Member Enumeration Documentation

◆ EyeState

Enumerator
InStorm 


Out of 120 ticks, 5 of them will have eyes closed; otherwise eyes are half closed.

InBed 


Slowly closes eyes.

If player is moderately damaged, then eyes will be half closed for first second in bed instead of open.
For the next second, eyes are half closed.
Afterwards, eyes are closed.

JustTookDamage 


Eyes always closed.

IsModeratelyDamaged 


Out of 120 ticks, 19 of them will have eyes closed; otherwise eyes are half closed.

IsBlind 


Eyes always closed.

IsTipsy 


Out of 120 ticks, 19 of them will have eyes closed; otherwise eyes are half closed.

IsPoisoned 


Out of 120 ticks, 19 of them will have eyes closed; otherwise eyes are half closed.