LHAsset Reference


Class Methods

createWithName

+ (LHAsset *)createWithName
Parameters
nm

The name of the new asset node. Can be used later to retrieve the asset from the children hierarchy.

assetFileName

The name of the asset file. Do not provide an extension. E.g If file is named "myAsset.lhasset.plist" then yous should pass "myAsset.lhasset".

prnt

The parent node. Must not be nil and must be a children of the LHScene (or subclass of LHScene).

Return Value

A new asset node.

//this is how you should use this function
LHAsset* asset = LHAsset::createWithName("myNewAsset", "OfficerAsset.lhasset", this->getGameWorld());
asset->setPosition(Point(110,40));

Discussion

Creates a new asset node with a specific name.

Declared In
LHAsset.h
Last updated: 2015-2-12

Back to top

Copyright © VLADU BOGDAN DANIEL PFA.