public void Update(float dt) { if (timeCooldown == null) { if (timeCooldowns.Count > 0) { timeCooldown = timeCooldowns.Dequeue(); } } if (timeCooldown != null) { if (adjust) { adjust = false; timeCooldown.AdjustRemainingWithRatio(ratio); } timeCooldown.Update(dt); if (timeCooldown.IsComplete()) { currentCharge++; //DLog.Log("Recover charge, current: " + currentCharge); timeCooldown = null; } } }
public override void Update(float dt) { timeCooldown.Update(dt); }