Difference between revisions of "Component::getBlob"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns a reference to the CBlob that owns this object. It is a method common to several object types that are considered 'components'. </onlyinclude> This ver...") |
(No difference)
|
Revision as of 18:24, 19 August 2012
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 );}