private void Update() { if (_cc.GameOver) { return; } if (Mathf.Abs(Time.deltaTime) < 0.01f) { return; } if (weapon != null) { if (Input.GetMouseButtonDown(0)) { weapon.AttackDown(); } if (Input.GetMouseButton(0)) { weapon.Attack(); } if (Input.GetMouseButtonUp(0)) { weapon.AttackUp(); } } if (Input.GetKeyDown(KeyCode.E)) { _pc.ApplyItem(); } if (!(Time.time >= _nextDamageTime)) { return; } _nextDamageTime = Time.time + _curDamageTime; _curDamageTime *= damageUpgradeTime; _cc.ApplyDamage(1); }