using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AutoMoney : MonoBehaviour
{
public bool CreateMoney = false;
public static int MoneyIncrease = 1;
public int InternalIncrease;
void Update()
{
InternalIncrease = MoneyIncrease;
if (CreateMoney == false)
{
CreateMoney = true;
StartCoroutine(CreateTheMoney());
}
}
IEnumerator CreateTheMoney ()
{
RisingNumber.NumCount += InternalIncrease;
yield return new WaitForSeconds(1);
CreateMoney = false;
}
}
,
↧