Class tlEffectsLibrary |
Description: | Effects library for storing a list of effects and particle images/animations |
Details: | When using LoadEffects, all the effects and images that go with them are stored in this type.
|
Table of contents: | Methods:
- AddEffect ( Method AddEffect:Void(e:tlEffect) )
- AddEmitter ( Method AddEmitter:Void(e:tlEmitter) )
- AddShape ( Method AddShape:Bool(shape:tlShape) )
- ClearAll ( Method ClearAll:Void() )
- Effects ( Method Effects:StringMap<tlEffect>() Property )
- GetEffect ( Method GetEffect:tlEffect(name:String) )
- GetEmitter ( Method GetEmitter:tlEmitter(name:String) )
- GetShape ( Method GetShape:tlShape(index:Int) )
- Name ( Method Name:String() Property )
|
Method AddEffect:Void(e:tlEffect) | Description: | add an effect to the library | Returns: | Void |
|
Method AddEmitter:Void(e:tlEmitter) | Description: | Add a new emitter to the library. | Returns: | Void | Details: | Emitters are stored using a map and can be retrieved using #GetEmitter. Generally you don't want to call this at all unless you're building your effects manually, just use AddEffect and all its emitters will be added also.
|
|
Method AddShape:Bool(shape:tlShape) | Description: | add a shape to the library | Returns: | Bool |
|
Method ClearAll:Void() | Description: | Clear all effects in the library | Returns: | Void | Details: | Use this to empty the library of all effects and shapes.
|
|
Method Effects:StringMap<tlEffect>() Property | Description: | Return the list of effects stored in the library | Returns: | StringMap |
|
Method GetEffect:tlEffect(name:String) | Description: | Retrieve an effect from the library | Returns: | tlEffect | Details: | Use this to get an effect from the library by passing the name of the effect you want. Example: local explosion:tlEffect=MyEffectsLibrary.GetEffect("explosion") All effects and emitters are stored using a directory like path structure so to get at sub effects you can do:</p> local explosion:tlEffect=MyEffectsLibrary.GetEffect("Effect/Emitter/Sub Effect/Another Emitter/A deeper sub effect")} Note that you should always use forward slashes.
|
|
Method GetEmitter:tlEmitter(name:String) | Description: | Retrieve an emitter from the library | Returns: | tlEmitter | Details: | Use this To get an emitter from the library by passing the name of the emitter you want. All effects And emitters are stored using a map with a directory like path structure. So retrieving an emitter called blast wave inside an effect called explosion would be done like so: local blastwave:tlemitter=MyEffectsLibrary.GetEmitter("explosion/blast wave") Note that you should always use forward slashes.
|
|
Method GetShape:tlShape(index:Int) | Description: | Get a Shape (#tlResource) from the library | Returns: | tlShape |
|
Method Name:String() Property | Description: | Get the name of the effects library | Returns: | String |
|