Ejemplo n.º 1
0
 public void DepositQuadToSave()
 {
     AccountSavedAccountResources.AddCredits(OnShipAccountResources.GetCredits() / 4);
     OnShipAccountResources.ResetCredits();
     AccountSavedAccountResources.AddMaterials(OnShipAccountResources.GetMaterials() / 4);
     OnShipAccountResources.ResetMaterials();
 }
Ejemplo n.º 2
0
 //Account parameters
 public void Save()
 {
     _haveProgress = true;
     PlayerPrefs.SetInt("PlayersCredits", AccountSavedAccountResources.GetCredits());
     PlayerPrefs.SetInt("PlayerMaterials", AccountSavedAccountResources.GetMaterials());
     PlayerPrefs.SetString("PlayerShip", _playerShipName);
     PlayerPrefs.SetInt("HaveProgress", 1);
 }
Ejemplo n.º 3
0
 private void Load()
 {
     if (PlayerPrefs.HasKey("HaveProgress"))
     {
         AccountSavedAccountResources.SetCredits(PlayerPrefs.GetInt("PlayersCredits"));
         AccountSavedAccountResources.SetMaterials(PlayerPrefs.GetInt("PlayerMaterials"));
         _playerShipName = PlayerPrefs.GetString("PlayerShip");
     }
     else
     {
         _playerShipName = "Falcon";
         Save();
     }
 }
Ejemplo n.º 4
0
 public void TryRemoveMaterials(int materialsValue, out bool success)
 {
     AccountSavedAccountResources.TryRemoveMaterials(materialsValue, out success);
 }
Ejemplo n.º 5
0
 public bool HaveEnoughCredits(int value)
 {
     return(AccountSavedAccountResources.GetCredits() > value);
 }
Ejemplo n.º 6
0
 public void TryRemoveCredits(int creditsValue, out bool success)
 {
     AccountSavedAccountResources.TryRemoveCredits(creditsValue, out success);
 }
Ejemplo n.º 7
0
 public bool HaveEnoughMaterials(int value)
 {
     return(AccountSavedAccountResources.GetMaterials() > value);
 }