Closed RostislavStoliarchuk closed 1 year ago
It will be stored as PlayerCurrency
into database table, for example, if your game has 2 currencies, soft and hard: it will store similarly to this:
[
{"playerId": "A", "dataId":"SOFT", "amount":100},
{"playerId": "A", "dataId":"HARD", "amount":50},
{"playerId": "B", "dataId":"SOFT", "amount":10},
{"playerId": "B", "dataId":"HARD", "amount":150},
]
to database table.
Thanks. But I did not understand how to make a request correctly and what is the best method, please tell me. thanks
I need to register the function of adding or subtracting coins during the purchase in unity (in my version, cryptocurrency). Which method can I use in my case? Can I use a method like this string SOFT = PlayerPrefs.SetInt ("SOFT", PlayerPrefs.GetInt ("SOFT") + 1);
I don't use player prefs to store save data, I try to explains about how it store save which is actually just uses embedded database (SQLite) for offline games. For online games, it will connect to web service, which has one made by PHP, you know about database?
Which variable in the code is responsible for the number of soft and hard coins? I found this public int rewardSoftCurrency; public int rewardHardCurrency;
and applied this
PlayerPrefs.SetInt ("rewardSoftCurrency", PlayerPrefs.GetInt ("rewardSoftCurrency") + 50);
I want to make a purchase of coins using the blockchain, I have already connected it mainly with the game, I need to make purchases and withdrawals. To do this, I need to either use new coins or find the variables of existing ones in order to be able to make adjustments or + or -