Difference between revisions of "CBlob"
From King Arthur's Gold Wiki
(Created page with "<onlyinclude> </onlyinclude> Methods: {| class="wikitableShiny" |- ! '''Method''' ! '''Description''' |- | getPosition | {{:CBlob::getPosition|getPos...") |
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.) |
||
(13 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 226: | Line 244: | ||
| {{:CBlob::ClickGridMenu|ClickGridMenu}} | | {{:CBlob::ClickGridMenu|ClickGridMenu}} | ||
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getSprite|getSprite]] |
− | | {{:CBlob:: | + | | {{:CBlob::getSprite|getSprite}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getShape|getShape]] |
− | | {{:CBlob:: | + | | {{:CBlob::getShape|getShape}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getMovement|getMovement]] |
− | | {{:CBlob:: | + | | {{:CBlob::getMovement|getMovement}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getWeapon|getWeapon]] |
− | | {{:CBlob:: | + | | {{:CBlob::getWeapon|getWeapon}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getBrain|getBrain]] |
− | | {{:CBlob:: | + | | {{:CBlob::getBrain|getBrain}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getAttachments|getAttachments]] |
− | | {{:CBlob:: | + | | {{:CBlob::getAttachments|getAttachments}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getInventory|getInventory]] |
− | | {{:CBlob:: | + | | {{:CBlob::getInventory|getInventory}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::Pickup|Pickup]] |
− | | {{:CBlob:: | + | | {{:CBlob::Pickup|Pickup}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::PickupIntoHands|PickupIntoHands]] |
− | | {{:CBlob:: | + | | {{:CBlob::PickupIntoHands|PickupIntoHands}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::PickupIntoInventory|PickupIntoInventory]] |
− | | {{:CBlob:: | + | | {{:CBlob::PickupIntoInventory|PickupIntoInventory}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getNetworkID|getNetworkID]] |
− | | {{:CBlob:: | + | | {{:CBlob::getNetworkID|getNetworkID}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getTeamNum|getTeamNum]] |
− | | {{:CBlob:: | + | | {{:CBlob::getTeamNum|getTeamNum}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::setTeamNum|setTeamNum]] |
− | | {{:CBlob:: | + | | {{:CBlob::setTeamNum|setTeamNum}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getTeam|getTeam]] |
− | | {{:CBlob:: | + | | {{:CBlob::getTeam|getTeam}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getSkinNum|getSkinNum]] |
− | | {{:CBlob:: | + | | {{:CBlob::getSkinNum|getSkinNum}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getHeadNum|getHeadNum]] |
− | | {{:CBlob:: | + | | {{:CBlob::getHeadNum|getHeadNum}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getSexNum|getSexNum]] |
− | | {{:CBlob:: | + | | {{:CBlob::getSexNum|getSexNum}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getName|getName]] |
− | | {{:CBlob:: | + | | {{:CBlob::getName|getName}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::isMyPlayer|isMyPlayer]] |
− | | {{:CBlob:: | + | | {{:CBlob::isMyPlayer|isMyPlayer}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getControls|getControls]] |
− | | {{:CBlob:: | + | | {{:CBlob::getControls|getControls}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::isKeyPressed|isKeyPressed]] |
− | | {{:CBlob:: | + | | {{:CBlob::isKeyPressed|isKeyPressed}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::wasKeyPressed|wasKeyPressed]] |
− | | {{:CBlob:: | + | | {{:CBlob::wasKeyPressed|wasKeyPressed}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::isKeyJustPressed|isKeyJustPressed]] |
− | | {{:CBlob:: | + | | {{:CBlob::isKeyJustPressed|isKeyJustPressed}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::isKeyJustReleased|isKeyJustReleased]] |
− | | {{:CBlob:: | + | | {{:CBlob::isKeyJustReleased|isKeyJustReleased}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::setKeyPressed|setKeyPressed]] |
− | | {{:CBlob:: | + | | {{:CBlob::setKeyPressed|setKeyPressed}} |
|- | |- | ||
− | | [[CBlob:: | + | | [[CBlob::getAimPos|getAimPos]] |
− | | {{:CBlob:: | + | | {{:CBlob::getAimPos|getAimPos}} |
+ | |- | ||
+ | | [[CBlob::setAimPos|setAimPos]] | ||
+ | | {{:CBlob::setAimPos|setAimPos}} | ||
+ | |- | ||
+ | | [[CBlob::getMapTile|getMapTile]] | ||
+ | | {{:CBlob::getMapTile|getMapTile}} | ||
+ | |- | ||
+ | | [[CBlob::isMapBlock|isMapBlock]] | ||
+ | | {{:CBlob::isMapBlock|isMapBlock}} | ||
+ | |- | ||
+ | | [[CBlob::canBePlacedAt|canBePlacedAt]] | ||
+ | | {{:CBlob::canBePlacedAt|canBePlacedAt}} | ||
+ | |- | ||
+ | | [[CBlob::Hit|Hit]] | ||
+ | | {{:CBlob::Hit|Hit}} | ||
+ | |- | ||
+ | | [[CBlob::HitMap|HitMap]] | ||
+ | | {{:CBlob::HitMap|HitMap}} | ||
+ | |- | ||
+ | | [[CBlob::Damage|Damage]] | ||
+ | | {{:CBlob::Damage|Damage}} | ||
+ | |- | ||
+ | | [[CBlob::Heal|Heal]] | ||
+ | | {{:CBlob::Heal|Heal}} | ||
+ | |- | ||
+ | | [[CBlob::getHitInfosFromArc|getHitInfosFromArc]] | ||
+ | | {{:CBlob::getHitInfosFromArc|getHitInfosFromArc}} | ||
+ | |- | ||
+ | | [[CBlob::getHitInfosFromRay|getHitInfosFromRay]] | ||
+ | | {{:CBlob::getHitInfosFromRay|getHitInfosFromRay}} | ||
+ | |- | ||
+ | | [[CBlob::getHitInfosSize|getHitInfosSize]] | ||
+ | | {{:CBlob::getHitInfosSize|getHitInfosSize}} | ||
+ | |- | ||
+ | | [[CBlob::getHitInfoByIndex|getHitInfoByIndex]] | ||
+ | | {{:CBlob::getHitInfoByIndex|getHitInfoByIndex}} | ||
+ | |- | ||
+ | | [[CBlob::SetDamageOwnerPlayer|SetDamageOwnerPlayer]] | ||
+ | | {{:CBlob::SetDamageOwnerPlayer|SetDamageOwnerPlayer}} | ||
+ | |- | ||
+ | | [[CBlob::getRespawnPosition|getRespawnPosition]] | ||
+ | | {{:CBlob::getRespawnPosition|getRespawnPosition}} | ||
+ | |- | ||
+ | | [[CBlob::CreateRespawnPoint|CreateRespawnPoint]] | ||
+ | | {{:CBlob::CreateRespawnPoint|CreateRespawnPoint}} | ||
+ | |- | ||
+ | | [[CBlob::ModifyRespawnPoint|ModifyRespawnPoint]] | ||
+ | | {{:CBlob::ModifyRespawnPoint|ModifyRespawnPoint}} | ||
+ | |- | ||
+ | | [[CBlob::PlugPlayer|PlugPlayer]] | ||
+ | | {{:CBlob::PlugPlayer|PlugPlayer}} | ||
+ | |- | ||
+ | | [[CBlob::UnplugPlayer|UnplugPlayer]] | ||
+ | | {{:CBlob::UnplugPlayer|UnplugPlayer}} | ||
+ | |- | ||
+ | | [[CBlob::MoveBlobStuffTo|MoveBlobStuffTo]] | ||
+ | | {{: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 313: | Line 430: | ||
! '''Type''' | ! '''Type''' | ||
! '''Description''' | ! '''Description''' | ||
+ | |- | ||
+ | | shape | ||
+ | | [[CShape|CShape@]] | ||
+ | | Reference to the blob's [[CShape|shape]] object. | ||
|- | |- | ||
| health | | health | ||
Line 337: | 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. |