IEnumerator DelayLoot() { yield return(new WaitForSeconds(1.5f)); if (!PlayerManager.s.IsGrabbed) { player.isinteracting = false; playerinteract.GetComponent <PlayerInteract>().enabled = true; if (chance <= 20) { money.mcurrentMoney += generate.CalculateAmount(2, 5); } } }
IEnumerator DelayLoot() { yield return(new WaitForSeconds(1.5f)); // player.GetComponent<PlayerController>().enabled = true; if (!PlayerManager.s.IsGrabbed) { player.isinteracting = false; playerinteract.GetComponent <PlayerInteract>().enabled = true; if (chance <= 10 && chance > 5) { money.mcurrentMoney += generate.CalculateAmount(1, 2); } else if (chance <= 5) { money.mcurrentMoney += 3; } } }