Class Character
General representation of characters in AngeliA games
Implements
Constructors
Character()
Declaration
public Character()
Fields
Attackness
Instance of the current functioning attackness behaviour
Declaration
public CharacterAttackness Attackness
Buff
Instance of the buff behaviour
Declaration
public readonly CharacterBuff Buff
FullSleepDuration
How long does it takes to get into full sleep
Declaration
public readonly FrameBasedInt FullSleepDuration
Health
Instance of the current functioning health behaviour
Declaration
public CharacterHealth Health
Movement
Instance of the current functioning movement behaviour
Declaration
public CharacterMovement Movement
NativeAttackness
Instance of the attackness behaviour from the character themselfs
Declaration
public readonly CharacterAttackness NativeAttackness
NativeHealth
Instance of the health behaviour from the character themselfs
Declaration
public readonly CharacterHealth NativeHealth
NativeMovement
Instance of the movement behaviour from the character themselfs
Declaration
public readonly CharacterMovement NativeMovement
NativeRenderer
Instance of the rendering behaviour from the character themselfs
Declaration
public readonly CharacterRenderer NativeRenderer
Rendering
Instance of the current functioning rendering behaviour
Declaration
public CharacterRenderer Rendering
TeleportDuration
How long does it takes to complete teleport
Declaration
public readonly FrameBasedInt TeleportDuration
Properties
AirDragX
Amount of horizontal speed lost every frame
Declaration
public override int AirDragX { get; }
Overrides
AirDragY
Amount of vertical speed lost every frame
Declaration
public override int AirDragY { get; }
Overrides
AllowBeingPush
True if this entity can be push by other
Declaration
public override bool AllowBeingPush { get; }
Overrides
AnimationType
Current animation type of this character is showing
Declaration
public CharacterAnimationType AnimationType { get; set; }
AttackTargetTeam
Target team for dealing damage to other
Declaration
public virtual int AttackTargetTeam { get; }
BodySuitInteractable
True if this character can equip body armor from equipment items (not effect cloths)
Declaration
public bool BodySuitInteractable { get; set; }
Bouncy
How bouncy is this character appears to be (150 by default)
Declaration
public virtual int Bouncy { get; }
CarryOtherOnTop
Trhe if this entity can carry other ICarrier on top
Declaration
public override bool CarryOtherOnTop { get; }
Overrides
CharacterState
Current general game state of this character
Declaration
public CharacterState CharacterState { get; }
CurrentAttackSpeedRate
How fast should the character attacks (0 means couldn't attack, 1000 means normal speed)
Declaration
public int CurrentAttackSpeedRate { get; }
DefaultCharacterHeight
Intrinsic body height of this character in cm
Declaration
public virtual int DefaultCharacterHeight { get; }
DespawnAfterPassoutDelay
How many frames does this character despawn after passout. Set to -1 if they don't despawn
Declaration
public int DespawnAfterPassoutDelay { get; set; }
EjectWhenInsideGround
True if this entity try to move out of ground automatically when it stuck inside ground
Declaration
public override bool EjectWhenInsideGround { get; }
Overrides
FacingRight
True if this entity is facing right side
Declaration
public override bool FacingRight { get; }
Overrides
FinalCharacterHeight
Get the height of this character in global space
Declaration
public virtual int FinalCharacterHeight { get; }
GlovesInteractable
True if this character can equip gloves from equipment items (not effect cloths)
Declaration
public bool GlovesInteractable { get; set; }
HandToolInteractable
True if this character can equip handtool from equipment items
Declaration
public bool HandToolInteractable { get; set; }
HelmetInteractable
True if this character can equip helmet from equipment items (not effect cloths)
Declaration
public bool HelmetInteractable { get; set; }
IgnoreDamageType
Do not take damage in these types
Declaration
public virtual Tag IgnoreDamageType { get; }
InventoryColumn
Column count for this character's inventory
Declaration
public virtual int InventoryColumn { get; }
InventoryID
Unique ID of this character from inventory system
Declaration
public int InventoryID { get; }
InventoryRow
Row count for this character's inventory
Declaration
public virtual int InventoryRow { get; }
InventoryType
Which type of inventory does this character have
Declaration
public virtual CharacterInventoryType InventoryType { get; }
JewelryInteractable
True if this character can equip jewelry from equipment items
Declaration
public bool JewelryInteractable { get; set; }
LastRequireBounceFrame
Frame when character last start to bounce
Declaration
public int LastRequireBounceFrame { get; set; }
PassOutFrame
Frame when character passout
Declaration
public int PassOutFrame { get; }
PhysicalLayer
Which physical layer should this entity fill it's collider in
Declaration
public override sealed int PhysicalLayer { get; }
Overrides
RenderingCellIndex
First rendering cell's index for current frame
Declaration
public int RenderingCellIndex { get; }
SelfCollisionMask
Intrinsic physics layers this entity should collide with
Declaration
public override sealed int SelfCollisionMask { get; }
Overrides
ShoesInteractable
True if this character can equip shoes from equipment items (not effect cloths)
Declaration
public bool ShoesInteractable { get; set; }
SleepStartFrame
Frame when character start to sleep
Declaration
public int SleepStartFrame { get; set; }
Team
Target team for taking damage from other
Declaration
public virtual int Team { get; }
TeleportEndFrame
End frame of the end of teleport
Declaration
public int TeleportEndFrame { get; }
TeleportToFrontSide
True if the character is teleporting to front side layer (closer to camera)
Declaration
public bool TeleportToFrontSide { get; }
Teleporting
True if the character is teleporting
Declaration
public bool Teleporting { get; }
TeleportingWithPortal
True if the character is teleporting with a portal
Declaration
public bool TeleportingWithPortal { get; }
Methods
AfterReposition(Int3, Int3)
This function is called when the entity's map position got repositioned by stage
Declaration
public override void AfterReposition(Int3 fromUnitPos, Int3 toUnitPos)
Overrides
BeforeUpdate()
[2/4] This function is called every frame when entity is in stage. Prioritize using this function to update physics logic.
Declaration
public override void BeforeUpdate()
Overrides
Bounce()
Make the character bounce
Declaration
public void Bounce()
CancelBounce()
Stop the character from bouncing
Declaration
public void CancelBounce()
CreateNativeAttackness()
Create new instance for character's intrinsic attackness behaviour
Declaration
protected virtual CharacterAttackness CreateNativeAttackness()
CreateNativeHealth()
Create new instance for character's intrinsic health behaviour
Declaration
protected virtual CharacterHealth CreateNativeHealth()
CreateNativeMovement()
Create new instance for character's intrinsic movement behaviour
Declaration
protected virtual CharacterMovement CreateNativeMovement()
CreateNativeRenderer()
Create new instance for character's intrinsic rendering behaviour
Declaration
protected virtual CharacterRenderer CreateNativeRenderer()
EnterTeleportState(bool, bool, bool)
Make character apears to be teleported. This will not actually teleport the character.
Declaration
public void EnterTeleportState(bool front, bool portal, bool lastHalfOnly = false)
Parameters
Type | Name | Description |
---|---|---|
bool | front | True if teleport to front layer |
bool | portal | True if teleport by a portal |
bool | lastHalfOnly | True if only shows the last half part of the teleport |
EquipmentAvailable(EquipmentType)
True if given type of equipment is available for this character
Declaration
public bool EquipmentAvailable(EquipmentType equipmentType)
FirstUpdate()
[1/4] This function is called every frame when entity is in stage. Prioritize using this function to fill collider in to physics system.
Declaration
public override void FirstUpdate()
Overrides
GetBonusFromFullSleep()
Give the character all bonus from full sleep
Declaration
public void GetBonusFromFullSleep()
GetCurrentPoseAnimationType()
Calculate which type of animation should this character shows
Declaration
public virtual CharacterAnimationType GetCurrentPoseAnimationType()
GetDescription()
Get character's description from language system
Declaration
public string GetDescription()
GetDisplayName()
Get character's display name from language system
Declaration
public string GetDisplayName()
IgnoreDamageFromLevel(int)
Make character not taking damage from level blocks for specified frames long
Declaration
public void IgnoreDamageFromLevel(int duration = 1)
InsideGroundCheck()
Function that holds the stuck inside ground checking logic
Declaration
protected override bool InsideGroundCheck()
Overrides
IsAttackAllowedByEquipment()
True if character can perform attack unfer current equipment set
Declaration
public virtual bool IsAttackAllowedByEquipment()
IsAttackAllowedByMovement()
True if character can perform attack under current movement
Declaration
public virtual bool IsAttackAllowedByMovement()
LateUpdate()
[4/4] This function is called every frame when entity is in stage. Prioritize using this function to render the entity.
Declaration
public override void LateUpdate()
Overrides
LockAnimationType(CharacterAnimationType, int)
Force character to show the given type of animation for specified frames long
Declaration
public void LockAnimationType(CharacterAnimationType type, int duration = 1)
OnActivated()
This function is called when entity enter the stage
Declaration
public override void OnActivated()
Overrides
OnCharacterRendered()
This function is called after character is rendered
Declaration
public virtual void OnCharacterRendered()
OnDamaged(Damage)
This function is called when character take damage
Declaration
public virtual void OnDamaged(Damage damage)
OnInactivated()
This function is called when entity leave the stage
Declaration
public override void OnInactivated()
Overrides
OverrideAttackness(CharacterAttackness, int)
Override the attackness behaviour for specified frames
Declaration
public void OverrideAttackness(CharacterAttackness attacknessOverride, int duration = 1)
OverrideHealth(CharacterHealth, int)
Override the health behaviour for specified frames
Declaration
public void OverrideHealth(CharacterHealth healthOverride, int duration = 1)
OverrideMovement(CharacterMovement, int)
Override the movement behaviour for specified frames
Declaration
public void OverrideMovement(CharacterMovement movementOverride, int duration = 1)
OverrideRenderer(CharacterRenderer, int)
Override the rendering behaviour for specified frames
Declaration
public void OverrideRenderer(CharacterRenderer rendererOverride, int duration = 1)
SetCharacterState(CharacterState)
Set character's general game state, ignore when state already is the current one
Declaration
public virtual void SetCharacterState(CharacterState state)
TryRepairAllEquipments(bool)
Repair equipments once for this character
Declaration
public int TryRepairAllEquipments(bool requireMultiple = false)
Parameters
Type | Name | Description |
---|---|---|
bool | requireMultiple | Set to true to repair all equipments for once |
Update()
[3/4] This function is called every frame when entity is in stage. Prioritize using this function to update physics logic.
Declaration
public override void Update()