Class ItemHolder
Entity that represent an item on map
Fields
TYPE_ID
Declaration
public static readonly int TYPE_ID
Properties
CarryOtherOnTop
Trhe if this entity can carry other ICarrier on top
Declaration
public override bool CarryOtherOnTop { get; }
Overrides
ItemCount
How many items does this holder contains
Declaration
public int ItemCount { get; set; }
ItemID
Item ID from inventory system
Declaration
public int ItemID { get; set; }
PhysicalLayer
Which physical layer should this entity fill it's collider in
Declaration
public override int PhysicalLayer { get; }
Overrides
SelfCollisionMask
Intrinsic physics layers this entity should collide with
Declaration
public override int SelfCollisionMask { get; }
Overrides
Methods
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
ClearHoldingPool()
Reset the internal data of the items that's exists outside player's view
Declaration
public static void ClearHoldingPool()
Collect(Character)
Collect the item holded inside this container
Declaration
public bool Collect(Character character)
Returns
Type | Description |
---|---|
bool | True if the item has been collected |
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
InsideGroundCheck()
Function that holds the stuck inside ground checking logic
Declaration
protected override bool InsideGroundCheck()
Overrides
Jump(int)
Perform a jump for once
Declaration
public void Jump(int velocity = 42)
Parameters
Type | Name | Description |
---|---|---|
int | velocity | Initial speed Y |
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
OnActivated()
This function is called when entity enter the stage
Declaration
public override void OnActivated()
Overrides
OnInactivated()
This function is called when entity leave the stage
Declaration
public override void OnInactivated()
Overrides
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()