-
Notifications
You must be signed in to change notification settings - Fork 7
IVirtualProperties interface
wvdvegt edited this page Jan 14, 2019
·
3 revisions
The IVirtualProperties interface as used by the ClientSideGameStorageAsset to retrieve values for properties defined as game based.
The example returns the current date and time for properties with a name 'GameTime' for all models in the ClientSideGameStorageAsset (as the model parameter is ignored).
Note: These type of game based properties are read-only per definition (and should be treated as such by asset developers) in the ClientSideGameStorageAsset.
#region IVirtualProperties Members
/// <summary>
/// Looks up a given key to find its associated value.
/// </summary>
///
/// <param name="model"> The model. </param>
/// <param name="key"> The key. </param>
///
/// <returns>
/// An Object.
/// </returns>
public object LookupValue(string model, string key)
{
if (key.Equals("GameTime"))
{
return DateTime.Now;
}
return null;
}
#endregion IVirtualProperties Members