Player On Chain Stats

The PlayerOnChainStats is responsible for statistics of a player that are stored on-chain.

Properties

  • private PlayerStats playerStats: References the PlayerStats associated with PlayerOnChainStats

  • public int potionCount: Represents the number of potions a player has.

  • public int xp: Represents the player's experience points.

Constructor

  • public PlayerOnChainStats(PlayerStats playerStats): Initializes a new instance of the PlayerOnChainStats class, assigning the PlayerStats.

Methods

  • public void UpdateOnChainData(int potionCount): Updates the on-chain data related to the player.

Last updated