Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
Helper class that provides API for handling Storage instances at runtime. Implements entity component system
conception for Storages instances.
Static Public Member Functions | |
static Storage | RentStorageEntity (Guid sourceId) |
Renting a free storage for the StoragesDatabase entry. More... | |
static Storage | RentStorageEntity (this StoragesDatabase.StorageContainer source) |
Renting a free storage entity related to the data container. More... | |
static bool | IsRentedFor (Guid sourceId) |
Checks is the source already has rented entity. More... | |
static bool | IsRentedFor (this StoragesDatabase.StorageContainer source) |
Checks is the source already has rented entity. More... | |
static bool | TryGetRented (this StoragesDatabase.StorageContainer source, out Storage instance) |
Tries to find Storage instance rented for certain StoragesDatabase.StorageContainer. More... | |
static bool | TryGetRented (Guid sourceId, out Storage instance) |
Tries to find Storage instance rented for certain StoragesDatabase.StorageContainer by its GUID. More... | |
static bool | ReleaseRentedEntity (this StoragesDatabase.StorageContainer source) |
Releases rented entity binded to the data source. More... | |
static bool | ReleaseRentedEntity (this Storage representation) |
Releases rented entity binded to the data source. More... | |
static bool | ReleaseRentedEntity (Guid storageId) |
Releases rented entity binded to the data source. More... | |
static Storage | InstantiateStorage (string resoruceBundle, string storageResourceKey) |
Instantiating Storage resource with certain signature to the world. More... | |
static Storage | InstantiateStorage (this StoragesDatabase.StorageContainer source) |
Instantiating Storage defined with data container. More... | |
static Storage | InstantiateStorage (params Tag[] tags) |
Looking for first detecting Storage resource with defined tags collection. More... | |
static IEnumerator< Storage > | GetEnumerator () |
Returns rented Storages enumerator. More... | |
Properties | |
static GameObject | HierarchyCategory [get] |
Game object that holds entire rented storages by default. | |
Events | |
static Storage.StorageDelegate | StorageRented |
Occurs when new storage rented. | |
static Storage.StorageDelegate | StorageReleasePreparation |
Occurs before storage will be released. | |
|
static |
Returns rented Storages enumerator.
|
static |
|
static |
|
static |
Checks is the source already has rented entity.
sourceId | Id of the storage in StoragesDatabase |
|
static |
Checks is the source already has rented entity.
source | Data container. |
|
static |
Releases rented entity binded to the data source.
storageId | If of the storage in database to release. |
true
in case if rented entity found. false
otherwise. Use as soon as you no longer need in-game Storage object that represent a source data.
|
static |
Releases rented entity binded to the data source.
representation | Rented storage instance with a bonded data source. |
true
in case if rented entity found. false
otherwise. ArgumentNullException | representation or its source property is null. |
Use as soon as you no longer need in-game Storage object that represent a source data.
|
static |
Releases rented entity binded to the data source.
source | Data source binded to the storage entity. |
true
in case if rented entity found. false
otherwise. ArgumentNullException | source is null. |
Use as soon as you no longer need in-game Storage object that represent a source data.
|
static |
Renting a free storage for the StoragesDatabase entry.
sourceId | Id of the storage in database. |
|
static |
Renting a free storage entity related to the data container.
source |
Use it instead InstantiateStorage(StoragesDatabase.StorageContainer) to following the ECS concept.
The service automatically create new instance in case current solo-one already has been rented. In that way you prevent creating unnecessary in-game entities related to back-end data, that allow you to handle any count of Storages at the same scene without affecting performance.
KeyNotFoundException | Storage resource defied with the source not found among loaded. |
ArgumentNullException | source is null. |
|
static |
Tries to find Storage instance rented for certain StoragesDatabase.StorageContainer by its GUID.
source | Id of source database entry to search. |
instance | Instance in case if found among rented. |
true
if found, false
otherwise. Unsafe method. Such an instance could be released from renting or change its content by an agent that rented it at first.
best practice to rent new instance.
|
static |
Tries to find Storage instance rented for certain StoragesDatabase.StorageContainer.
source | Source database entry to search. |
instance | Instance in case if found among rented. |
true
if found, false
otherwise. Unsafe method. Such an instance could be released from renting or change its content by an agent that rented it at first.
best practice to rent new instance.