CBlob
From King Arthur's Gold Wiki
CBlob is most common networked object in game that can be interacted in some way.
Methods:
Properties:
| Property | Type | Description |
|---|---|---|
| shape | CShape@ | Reference to the blob's shape object. |
| health | f32 | |
| defaultHealth | f32 | |
| inventoryIconFrame | int | |
| inventoryMaxStacks | int | |
| inventoryFramDimension | dimension2di | |
| inventorySlots | dimension2di |
Hooks:
| Signature | Description |
|---|---|
| void onInit(CBlob@ this) | Called on initialization. |
| void onTick(CBlob@ this) | Called on every tick. |
| f32 onHit(CBlob@ this, Vec2f worldPoint, Vec2f velocity, f32 damage, CBlob@ hitterBlob, u8 customData) | Called on every hit. |
| bool canBePickedUp(CBlob@ this, CBlob@ other) | Called on pickup check. |
| bool doesCollideWithBlob(CBlob@ this, CBlob@ other) | Called on collision check. |
| void onCollision(CBlob@ this, CBlob@ other, bool solid, Vec2f normal, Vec2f point) | Called on collision. |
| void onDie(CBlob@ this) | Called on death. |