0

In my game, I have an in-game store where the user can buy sprites using game points that they earned. There is only one issue after the user has brought the sprite they want to play with, How do I change that sprite to the be the new main sprite that the user will play with?

Thanks in advance

Ahmed
  • 13
  • 2

1 Answers1

0

Please be more specific with this question. However, I am going to assume you locally store this data, and if you do you will probably want to use nsuserdefaults. Here is an example of how to story key-value pairs, or in your case, character to sprite.

let defaults = NSUserDefaults.standardUserDefaults() defaults.setObject("Coding Explorer", forKey: "userNameKey")

Patrick
  • 165
  • 2
  • 2
  • 8