Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using AC;
  5.  
  6. public class Slots: MonoBehaviour {
  7.  
  8. public storeVariables store;
  9. public string slot1;
  10. public string slot2;
  11. public string slot3;
  12. public int lenguaje;
  13. private void Start()
  14. {
  15. LoadProfileVariable(0, 82);
  16. LoadProfileVariable(1, 83);
  17. LoadProfileVariable(2, 84);
  18. }
  19. void Update ()
  20. {
  21.  
  22. }
  23.  
  24. public string LoadProfileVariable(int profileID, int varID)
  25. {
  26. OptionsData profileData = Options.LoadPrefsFromID(profileID);
  27. string variableData = profileData.linkedVariables;
  28.  
  29. string[] varsArray = variableData.Split(SaveSystem.pipe[0]);
  30. foreach (string chunk in varsArray)
  31. {
  32. string[] chunkData = chunk.Split(SaveSystem.colon[0]);
  33.  
  34. int _id = 0;
  35. int.TryParse(chunkData[0], out _id);
  36.  
  37. if (_id == varID)
  38. {
  39. return chunkData[1];
  40. }
  41. }
  42.  
  43. return string.Empty;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement