WorldInformation
WorldInformation exists for each avatar and contains information about the avatar’s adventures.
State
- Account Address: Addresses.WorldInformation
- State Address: Use the address of your avatar as it is.
Get State:
cs
public WorldInformation? GetWorldInformation(IWorld world, Address address)
{
IAccount account = world.GetAccount(Addresses.WorldInformation);
if (account is null)
{
return null;
}
IValue state = account.GetState(address);
return state switch
{
Bencodex.Types.Dictionary d => new WorldInformation(d),
_ => null,
};
}