//called when player is actually using the cyclone ability //spins player around and hits all enemies around them //player heals for every 3 enemies they hit private void UsingCyclone() { _currComboTime = (Time.time - _startComboTime) / _cycloneDuration; if (_currComboTime < 1) { if (_debugCyclone) { Debug.DrawLine(transform.position, transform.position + (transform.forward * _cycloneDetectionDistance)); } if (Physics.Raycast(_sword.transform.position, _sword.transform.up, out hit, _cycloneDetectionDistance)) { if (hit.collider.GetComponent <AIEnemy>()) { AIEnemy EnemyHit = hit.collider.GetComponent <AIEnemy>(); //Debug.Log("hit"); if (_enemyHit.Count > 0) { if (!CycloneAlreadyHitEnemy(EnemyHit)) { if (EnemyHit.GotHit(_cycloneAttackDamage, transform.forward * _cycloneKnockBack, hit.point)) { Debug.Log("cyclone hit"); _enemyHit.Add(EnemyHit); ContinueCombo(); if (_enemyHit.Count > 2) { _enemyHit = new List <AIEnemy>(); Debug.Log("cyclone heal"); _pStats.PHeal(_cycloneHeal); } } } } else { if (EnemyHit.GotHit(_cycloneAttackDamage, transform.forward * _cycloneKnockBack, hit.point)) { Debug.Log("cyclone hit"); ContinueCombo(); _enemyHit.Add(EnemyHit); } } } } transform.Rotate(Vector3.up, _cycloneSpinSpeed); } else { _currComboTime = 1; _myability = SpecialAbility.NONE; _sword.transform.localPosition = _swordReset; _enemyHit = new List <AIEnemy>(); } }