Difference between revisions of "CBlob"
From King Arthur's Gold Wiki
Vermilicious (Talk | contribs) m (Added a new table with some of the available hooks. The list is by no means complete, and each one should probably have their own page/template.) |
|||
| Line 458: | Line 458: | ||
| dimension2di | | dimension2di | ||
| | | | ||
| + | |- | ||
| + | |} | ||
| + | |||
| + | Hooks: | ||
| + | |||
| + | {| class="wikitableShiny" border="1" | ||
| + | |- | ||
| + | ! '''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. | ||
|- | |- | ||
|} | |} | ||
Latest revision as of 15:10, 31 January 2016
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. |