Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
Implements conception of the storage entry.
Defined resource signature change not allowed to prevent data fraud.
Public Member Functions | |
ItemContainer (string itemReourceBundle, string itemKey) | |
Creates database entry for the certain item key. More... | |
ItemContainer (string itemReourceBundle, string itemKey, int count) | |
Creates database entry for the certain item key. More... | |
ItemContainer (Item resource) | |
Creates container that describes Item resource. Collects entire AItemFeature states provided with the Item.features property. More... | |
ItemContainer (Item resource, int count) | |
Creates container that describes Item resource. More... | |
ItemContainer (SerializationInfo info, StreamingContext context) | |
Allows to binary serializer instantiate the object from binary. More... | |
void | SaveSessionData () |
Saves entire runtime data from instantiated Resource to the container. | |
void | SaveAssetProperties () |
Saving data from the Resource located Item.properties to the container. | |
void | LoadAssetProperties () |
Loads stored binary data to the Resource instance's Item.properties. | |
override int | GetHashCode () |
Returns related to the item's signature. More... | |
override string | ToString () |
Returns resource signature along with placed resource count. More... | |
void | Dispose () |
Releases on-scene resources related to the container. | |
void | SetFeatureState (FeatureType prop) |
Collects session data from the property and stores it in container. More... | |
void | SetFeatureState (Type propType, byte[] data) |
Collects session data from the property and stores it in container. More... | |
void | SetFeatureState (string propFullType, byte[] data) |
Collects session data from the property and stores it in container. More... | |
bool | ContainsFeatureState (FeatureType prop) |
Checks is the container contains binary data related to the property. More... | |
bool | ContainsFeatureState (Type prop) |
Checks is the container contains binary data related to the property. More... | |
bool | ContainsFeatureState (string prop) |
Checks is the container contains binary data related to the property. More... | |
bool | DropFeatureState (Type prop) |
Drops property related data. More... | |
bool | DropFeatureState (string prop) |
Drops property data. More... | |
Protected Member Functions | |
override void | OnModified () |
Should be called any time when some important runtime property is changed. | |
virtual void | Dispose (bool disposing) |
Properties | |
static Transform | ItemsHolder [get] |
On scene game object that holds entire instantiated Item instance with connected ItemContainer sources. | |
Item | Resource [get] |
Gets an Item resource declared with the container by the Bundle.Key properties. Returns null in case if DynamicResource has not been found. | |
bool | IsResourceInstantiated [get] |
Checks is that container has Resource instance that may suppose that Item.properties and AFeaturesExtendingResource<FeatureType>.features has been modified and requires session data save. | |
string | Bundle [get, set] |
Bundle key of the item related to the item resource defined into the entry. | |
string | Key [get, set] |
Resource key of the item related to the entry. | |
int | Count [get, set] |
Count of items into the entry stack. | |
int | Available [get] |
How many items available for transaction. | |
int | Reserved [get, set] |
How many items reserved by transaction orders. More... | |
Guid | StorageId = Guid.Empty [get, set] |
Id of parental storage container. | |
FeatureContainer | this[Type type] [get] |
Returns FeatureContainer by type in string format in case if it exists. More... | |
FeatureContainer | this[string type] [get] |
Returns FeatureContainer by type in string format in case if it exists. More... | |
Dictionary< string, FeatureContainer > | features [get] |
Collection of FeatureType related cross-session data in binary format. | |
Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer | ( | string | itemReourceBundle, |
string | itemKey | ||
) |
Creates database entry for the certain item key.
itemReourceBundle | Resource bundle key related to the item. |
itemKey | Unique key related to the item stored at the entry entity. |
Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer | ( | string | itemReourceBundle, |
string | itemKey, | ||
int | count | ||
) |
Creates database entry for the certain item key.
itemReourceBundle | Resource bundle key related to the item. |
itemKey | Unique key related to the item stored at the entry entity. |
count | Count of resource inside the container. |
Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer | ( | Item | resource | ) |
Creates container that describes Item resource. Collects entire AItemFeature states provided with the Item.features property.
resource | Source prefab resource that will be represented with container. |
Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer | ( | Item | resource, |
int | count | ||
) |
Creates container that describes Item resource.
resource | Source prefab resource that will be represented with container. |
count | Count of resource inside the container. |
Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer | ( | SerializationInfo | info, |
StreamingContext | context | ||
) |
Allows to binary serializer instantiate the object from binary.
info | |
context |
|
inherited |
Checks is the container contains binary data related to the property.
prop | Property to check. |
true
in case if there is stored property data.
|
inherited |
Checks is the container contains binary data related to the property.
prop | Property to check. |
true
in case if there is stored property data.
|
inherited |
Checks is the container contains binary data related to the property.
prop | Property to check. |
true
in case if there is stored property data.
|
inherited |
Drops property data.
prop | Property name to release. |
|
inherited |
Drops property related data.
prop | Type of the FeatureType to data release. |
override int Doloro.InvetorySystem.StoragesDatabase.ItemContainer.GetHashCode | ( | ) |
Returns related to the item's signature.
(Bundle + "." ?? "" + Key).GetHashCode()
|
inherited |
Collects session data from the property and stores it in container.
prop | Property to data save. |
|
inherited |
Collects session data from the property and stores it in container.
propFullType | Full name of property's type related to the data. |
data | Binary data related to the property. |
|
inherited |
Collects session data from the property and stores it in container.
propType | Property type related to the data. |
data | Binary data related to the property. |
override string Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ToString | ( | ) |
Returns resource signature along with placed resource count.
|
getset |
How many items reserved by transaction orders.
Exists only at runtime and drops after session is over.
|
getinherited |
Returns FeatureContainer by type in string format in case if it exists.
type | Type in string format received with the Type.FullName |
null
in case if not found.
|
getinherited |
Returns FeatureContainer by type in string format in case if it exists.
type | Type of the FeatureType instance. |
null
in case if not found.