private IEnumerator StartCooldown(ICooldown cd, CooldownSettings cds) { cd.OnCooldown = true; yield return(new WaitForSeconds(cds.cooldownTime)); cd.OnCooldown = false; }
public void Init(ICooldown itemCooldown, CooldownSettings CDS) { pCDS = CDS; pItemCooldown = itemCooldown; StartCoroutine(StartCooldown(itemCooldown, CDS)); }