how i can -10 from thing in another code?
using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityEngine;
public class Buy_H : MonoBehaviour
{
public GameObject CrystalsText;
void Start()
{
DataManegement.datamanegement.LoadData();
CrystalsText.GetComponent().text = DataManegement.datamanegement.AllCrystals.ToString() + " ";
}
public void BackToGame()
{
SceneManager.LoadScene("Main");
}
public void BUY_H()
{
if (DataManegement.datamanegement.AllCrystals < 20)
{
Debug.Log("ﺔﻴﻓﺎﻛ ﺮﻫﺍﻮﺟ ﻚﻳﺪﻟ ﺲﻴﻟ");
}
if (DataManegement.datamanegement.AllCrystals > 19)
{
DataManegement.datamanegement.AllCrystals -= 20; //*********** that here not work
}
}
public void BUY_L()
{
if (DataManegement.datamanegement.AllCrystals < 75)
{
Debug.Log("ﺔﻴﻓﺎﻛ ﺮﻫﺍﻮﺟ ﻚﻳﺪﻟ ﺲﻴﻟ");
}
if (DataManegement.datamanegement.AllCrystals > 74)
{
DataManegement.datamanegement.AllCrystals -= 75; //*********** and that here not work
}
}
}
↧