Stores data and properties for an individual material.
You can only create and access materials through the MaterialManager.
Material | Stores data and properties for an individual material. |
Member Functions | |
SetType | |
GetType | |
SetSpecial | |
GetSpecial | |
Material Related Constants | |
C_MATERIAL_TYPE_CONSTANTS | |
C_MATERIAL_TYPE_NONE | Means invalid material. |
C_MATERIAL_TYPE_NORMAL | The default. |
C_MATERIAL_TYPE_VERTICAL_LADDER | For designating shapes as ladders. |
C_MATERIAL_TYPE_WARP | For designating shapes as warps. |
C_MATERIAL_TYPE_DUMMY | For tweaking sorting and smart shadows. |
C_MATERIAL_SPECIAL_CONSTANTS | |
C_MATERIAL_SPECIAL_NONE | Default, no special properties. |
nil SetType(number materialType)
Sets what kind of basic behavior this should have. For properties like ladders and warps, you need to set this. This is done for you in setup_constants.lua.
materialType | Should be sent one of the C_MATERIAL_TYPE_CONSTANTS. |
nil SetSpecial(number materialSpecial)
Sets extra properties for a material. Not really used yet, but might be useful for designating special kinds of collisions later.
materialSpecial | Should be sent one of the C_MATERIAL_SPECIAL_CONSTANTS. |
C_MATERIAL_TYPE_CONSTANTS | |
C_MATERIAL_TYPE_NONE | Means invalid material. |
C_MATERIAL_TYPE_NORMAL | The default. |
C_MATERIAL_TYPE_VERTICAL_LADDER | For designating shapes as ladders. |
C_MATERIAL_TYPE_WARP | For designating shapes as warps. |
C_MATERIAL_TYPE_DUMMY | For tweaking sorting and smart shadows. |
C_MATERIAL_SPECIAL_CONSTANTS | |
C_MATERIAL_SPECIAL_NONE | Default, no special properties. |
The default. Just a normal thing you can bump into. Any other material type will not perform real collisions, just report them.
For designating shapes as ladders. Defined in setup_constants.lua and used in the treeworld scripts.
For designating shapes as warps. Defined in setup_constants.lua and used in the treeworld scripts.