void Update() { if (IsDead()) { return; } if (currentEnemy && currentEnemy.IsDead()) { currentEnemy = null; } if (knockBackTimer > 0) { knockBackTimer -= Time.deltaTime; if (knockBackTimer < 0) { ragdollControl.disableRagDoll(); transform.position = torso.parent.position; torso.parent.localPosition = Vector3.zero; } } if (!isWaiting) { unitAttack.ProcessAttack(); unitMover.ProcessMover(); } }