ESCDependencyInjector
Extends: RefCounted
Description
Escoria dependency injector.
Holds factory methods for replacing non-singleton Escoria core classes. If you wish to replace any Escoria core classes with your own derived classes, follow these steps:
Create a class in your project that extends
ESCDependencyInjector:extends ESCDependencyInjectorOverride the methods that create the classes that you want to replace.
In your game initialization, replace the
escoria.diinstance variable with your new dependency injector:escoria.di = MyDependencyInjector.new()
For more details see: https://docs.godotengine.org/en/stable/tutorials/best_practices/scene_organization.html
Methods
esc_inventory_item
func esc_inventory_item(p_item: ESCItem) -> Variant
Factory method for creating an ESCInventoryItem from an ESCItem.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
p_item |
|
The ESCItem to wrap in an ESCInventoryItem |
yes |
Returns
Returns nothing.