User Tools

Site Tools


custom-asset

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
custom-asset [2022/03/29 20:52] – created minotoriouscustom-asset [2022/03/29 20:53] minotorious
Line 1: Line 1:
 ASSET classes are the basic registerable types in Foundation. ASSET classes are the basic registerable types in Foundation.
  
-For reference all available pure DATA classes can be found in [[api#assets_classes|this]] section of the API.+For reference all available ASSET classes can be found in [[api#assets_classes|this]] section of the API.
  
 ===== Creating & Using a Custom ASSET Object ===== ===== Creating & Using a Custom ASSET Object =====
 ==== Step 1: Defining an ASSET Object using a Lua Table ==== ==== Step 1: Defining an ASSET Object using a Lua Table ====
-To create a custom ASSET object we will need to make use of the ''mod:registerClass(AssetTable)'' function providing it with an associated Lua Table.+To create a custom [[assets|ASSET]] object we will need to make use of the ''mod:registerClass(AssetTable)'' function providing it with an associated Lua Table.
  
-Here you decide what properties your custom ASSET object will contain. +Here you decide what properties your custom [[assets|ASSET]] object will contain. 
 <code lua> <code lua>
 local MY_ASSET_OBJECT = { local MY_ASSET_OBJECT = {
Line 37: Line 37:
 }) })
 </code> </code>
-Remember, each unique ASSET instance requires an Id that identifies it from other ASSETs of the same class.+Remember, each unique [[assets|ASSET]] instance requires an Id that identifies it from other [[assets|ASSET]]s of the same class.
  
 In case you omit any properties you don't yet need to explicitly set they will use their default values. As we have done with ''Property2'' above. In case you omit any properties you don't yet need to explicitly set they will use their default values. As we have done with ''Property2'' above.
custom-asset.txt · Last modified: 2022/03/30 10:16 by minotorious

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki