Saturday, 28 March 2015
Shop
The shop is basically a set of GUI buttons that when clicked modify a variable. The data stored in those variables is loaded in via xml (as disscussed in the last post). When buying an upgrade to a stat, the score the user has built up during the game becomes money, and is used to pay for the upgrades
Friday, 6 March 2015
Load & Save XML Data
As the game is going to include editable character stats i decided it would be a nice feature to be able to save those stats so that the user could come back to the game and have their character saved from the last session.
I decided the easiest was to do this would be to store the data inside an XML file.
This data was then read in through script, and stored as the variables within the player attributes.
I also decided that the data was also to be loaded seperatly when in the shop menu, as the player attributes script doesn't exist there. Therefore in the shop menu the data is loaded stored as a placeholder variable, and then when the user leaves the shop it is saved, and can be loaded with the updated stats when the game starts
Subscribe to:
Posts (Atom)