Closed RandomShaper closed 4 years ago
Hi @RandomShaper , for what is the step used for? is it similar to increment?
It's similar, but has an important difference: instead of adding some value to the current count, this one sets the final value regardless the current one. It's closer to what you achieve in iOS' Game Center with this: https://docs.godotengine.org/en/stable/tutorials/platform/services_for_ios.html#award-achievement
Sets an achievement to have at least the given number of steps completed. Calling this method while the achievement already has more steps than the provided value is a no-op. Once the achievement reaches the maximum number of steps, the achievement will automatically be unlocked, and any further mutation operations will be ignored.
Sounds good to me. Merged
This is useful to avoid having to track the current value. It also makes easier having a common API in your game that wraps both this and the iOS Game Center integration, which doesn't have an increment method.
I take the opportunity to thank you for this project! It's excellent, very well done and has saved me a lot of time.