private void Update() { if (_currentWeapon != null) { if (Input.GetMouseButtonDown(0)) { _currentWeapon.ReceiveAttackCommand(); } else if (Input.GetMouseButtonUp(0)) { _currentWeapon.FinishAttackCommand(); } /* * float attack = Input.GetAxis("Attack"); * if (attack > .5f && !_isAttacking) { * _currentWeapon.ReceiveAttackCommand(); * _isAttacking = true; * } else if (attack < .5f && _isAttacking) { * _currentWeapon.FinishAttackCommand(); * _isAttacking = false; * } */ } if (Input.GetMouseButtonDown(1) && _displayChemoTreatmentCoroutine == null) { ChemoTreat(); } }