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.) |
|||
(11 intermediate revisions by 3 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)}} | ||
+ | |- | ||
+ | | [[CBlob::set_(type)|set_(type)]] | ||
+ | | {{:CBlob::set_(type)|set_(type)}} | ||
+ | |- | ||
+ | | [[CBlob::Sync|Sync]] | ||
+ | | {{:CBlob::Sync|Sync}} | ||
|- | |- | ||
| [[CBlob::getPosition|getPosition]] | | [[CBlob::getPosition|getPosition]] | ||
Line 78: | Line 90: | ||
| [[CBlob::isOnLadder|isOnLadder]] | | [[CBlob::isOnLadder|isOnLadder]] | ||
| {{:CBlob::isOnLadder|isOnLadder}} | | {{:CBlob::isOnLadder|isOnLadder}} | ||
+ | |- | ||
+ | | [[CBlob::isOnWall|isOnWall]] | ||
+ | | {{:CBlob::isOnWall|isOnWall}} | ||
+ | |- | ||
+ | | [[CBlob::isOnCeiling|isOnCeiling]] | ||
+ | | {{:CBlob::isOnCeiling|isOnCeiling}} | ||
|- | |- | ||
| [[CBlob::isInAction|isInAction]] | | [[CBlob::isInAction|isInAction]] | ||
Line 303: | Line 321: | ||
| [[CBlob::getAimPos|getAimPos]] | | [[CBlob::getAimPos|getAimPos]] | ||
| {{:CBlob::getAimPos|getAimPos}} | | {{:CBlob::getAimPos|getAimPos}} | ||
+ | |- | ||
+ | | [[CBlob::setAimPos|setAimPos]] | ||
+ | | {{:CBlob::setAimPos|setAimPos}} | ||
|- | |- | ||
| [[CBlob::getMapTile|getMapTile]] | | [[CBlob::getMapTile|getMapTile]] | ||
Line 316: | Line 337: | ||
| {{:CBlob::Hit|Hit}} | | {{:CBlob::Hit|Hit}} | ||
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::HitMap|HitMap]] |
− | | {{:CBlob:: | + | | {{:CBlob::HitMap|HitMap}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::Damage|Damage]] |
− | | {{:CBlob:: | + | | {{:CBlob::Damage|Damage}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::Heal|Heal]] |
− | | {{:CBlob:: | + | | {{:CBlob::Heal|Heal}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getHitInfosFromArc|getHitInfosFromArc]] |
− | | {{:CBlob:: | + | | {{:CBlob::getHitInfosFromArc|getHitInfosFromArc}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getHitInfosFromRay|getHitInfosFromRay]] |
− | | {{:CBlob:: | + | | {{:CBlob::getHitInfosFromRay|getHitInfosFromRay}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getHitInfosSize|getHitInfosSize]] |
− | | {{:CBlob:: | + | | {{:CBlob::getHitInfosSize|getHitInfosSize}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getHitInfoByIndex|getHitInfoByIndex]] |
− | | {{:CBlob:: | + | | {{:CBlob::getHitInfoByIndex|getHitInfoByIndex}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::SetDamageOwnerPlayer|SetDamageOwnerPlayer]] |
− | | {{:CBlob:: | + | | {{:CBlob::SetDamageOwnerPlayer|SetDamageOwnerPlayer}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getRespawnPosition|getRespawnPosition]] |
− | | {{:CBlob:: | + | | {{:CBlob::getRespawnPosition|getRespawnPosition}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::CreateRespawnPoint|CreateRespawnPoint]] |
− | | {{:CBlob:: | + | | {{:CBlob::CreateRespawnPoint|CreateRespawnPoint}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::ModifyRespawnPoint|ModifyRespawnPoint]] |
− | | {{:CBlob:: | + | | {{:CBlob::ModifyRespawnPoint|ModifyRespawnPoint}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::PlugPlayer|PlugPlayer]] |
− | | {{:CBlob:: | + | | {{:CBlob::PlugPlayer|PlugPlayer}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::UnplugPlayer|UnplugPlayer]] |
− | | {{:CBlob:: | + | | {{:CBlob::UnplugPlayer|UnplugPlayer}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::MoveBlobStuffTo|MoveBlobStuffTo]] |
− | | {{:CBlob:: | + | | {{:CBlob::MoveBlobStuffTo|MoveBlobStuffTo}} |
+ | |- | ||
+ | | [[CBlob::getPlayer|getPlayer]] | ||
+ | | {{:CBlob::getPlayer|getPlayer}} | ||
+ | |- | ||
+ | | [[CBlob::SetTimeToDie|SetTimeToDie]] | ||
+ | | {{:CBlob::SetTimeToDie|SetTimeToDie}} | ||
+ | |- | ||
+ | | [[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 367: | Line 430: | ||
! '''Type''' | ! '''Type''' | ||
! '''Description''' | ! '''Description''' | ||
+ | |- | ||
+ | | shape | ||
+ | | [[CShape|CShape@]] | ||
+ | | Reference to the blob's [[CShape|shape]] object. | ||
|- | |- | ||
| health | | health | ||
Line 391: | 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. |