Difference between revisions of "CBlob"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) |
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.) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
− | + | CBlob is most common networked object in game that can be interacted in some way. | |
</onlyinclude> | </onlyinclude> | ||
Line 9: | Line 9: | ||
! '''Method''' | ! '''Method''' | ||
! '''Description''' | ! '''Description''' | ||
+ | |- | ||
+ | | [[CBlob::exists|exists]] | ||
+ | | {{:CBlob::exists|exists}} | ||
|- | |- | ||
| [[CBlob::get_(type)|get_(type)]] | | [[CBlob::get_(type)|get_(type)]] | ||
Line 15: | Line 18: | ||
| [[CBlob::set_(type)|set_(type)]] | | [[CBlob::set_(type)|set_(type)]] | ||
| {{:CBlob::set_(type)|set_(type)}} | | {{:CBlob::set_(type)|set_(type)}} | ||
+ | |- | ||
+ | | [[CBlob::Sync|Sync]] | ||
+ | | {{:CBlob::Sync|Sync}} | ||
|- | |- | ||
| [[CBlob::getPosition|getPosition]] | | [[CBlob::getPosition|getPosition]] | ||
Line 381: | Line 387: | ||
| [[CBlob::SendCommand|SendCommand]] | | [[CBlob::SendCommand|SendCommand]] | ||
| {{:CBlob::SendCommand|SendCommand}} | | {{:CBlob::SendCommand|SendCommand}} | ||
+ | |- | ||
+ | | [[CBlob::Tag|Tag]] | ||
+ | | {{:CBlob::Tag|Tag}} | ||
+ | |- | ||
+ | | [[CBlob::Untag|Untag]] | ||
+ | | {{:CBlob::Untag|Untag}} | ||
+ | |- | ||
+ | | [[CBlob::hasTag|hasTag]] | ||
+ | | {{:CBlob::hasTag|hasTag}} | ||
+ | |- | ||
+ | | [[CBlob::AddScriptObject|AddScriptObject]] | ||
+ | | {{:CBlob::AddScriptObject|AddScriptObject}} | ||
+ | |- | ||
+ | | [[CBlob::DeleteScriptObject|DeleteScriptObject]] | ||
+ | | {{:CBlob::DeleteScriptObject|DeleteScriptObject}} | ||
+ | |- | ||
+ | | [[CBlob::DeleteScriptObjectByIndex|DeleteScriptObjectByIndex]] | ||
+ | | {{:CBlob::DeleteScriptObjectByIndex|DeleteScriptObjectByIndex}} | ||
+ | |- | ||
+ | | [[CBlob::AddScriptObjectGroup|AddScriptObjectGroup]] | ||
+ | | {{:CBlob::AddScriptObjectGroup|AddScriptObjectGroup}} | ||
+ | |- | ||
+ | | [[CBlob::getScriptObject|getScriptObject]] | ||
+ | | {{:CBlob::getScriptObject|getScriptObject}} | ||
+ | |- | ||
+ | | [[CBlob::getScriptObjectGroupSize|getScriptObjectGroupSize]] | ||
+ | | {{:CBlob::getScriptObjectGroupSize|getScriptObjectGroupSize}} | ||
+ | |- | ||
+ | | [[CBlob::getScriptObjectsArray|getScriptObjectsArray]] | ||
+ | | {{:CBlob::getScriptObjectsArray|getScriptObjectsArray}} | ||
+ | |- | ||
+ | | [[CBlob::GetScriptObjectsArray|GetScriptObjectsArray]] | ||
+ | | {{:CBlob::GetScriptObjectsArray|GetScriptObjectsArray}} | ||
|- | |- | ||
|} | |} | ||
Line 419: | 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 16: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. |