Component::getBlob

From King Arthur's Gold Wiki
Revision as of 19:53, 19 August 2012 by Shadlington (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns a reference to the CBlob that owns this object. It is a method common to several object types that are considered 'components'.


This very simple method is useful anywhere you want to perform some action on the CBlob that owns the component you're working with rather than the component itself.

CBlob@ getBlob()

Example from Entities/Characters/Scripts/BuilderInventory.as:

if (this.hasRequirements( reqs, missing ))
{
  this.TakeRequirements( reqs );
  CBlob @shopBlob = CreateBlob( "genericblock", "Entities/Workshops/Base/WorkshopWAR.cfg", 0, this.getBlob().getPosition() );
  this.getBlob().Pickup( shopBlob, false );}

Object method of: CInventory, CAttachment, CBrain, CMovement, CShape, CWeapon