Component::getBlob
From King Arthur's Gold Wiki
Revision as of 18:53, 19 August 2012 by Shadlington (Talk | contribs)
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