private void CheckPowerStrings(KeyCode kc) { _previousPressedKey = kc; CurrentPowerString += kc.ToString().ToLower(); var len = CurrentPowerString.Length; if ((ShootKeyword.StartsWith(CurrentPowerString) && PlayerController.HasBullet) || (ShieldKeyword.StartsWith(CurrentPowerString) && PlayerController.HasShield)) { DisplayedPowerText.text = CurrentPowerString; if (CurrentPowerString == ShootKeyword) { PlayerController.Shoot(); CurrentPowerString = ""; DisplayedPowerText.text = ""; } if (CurrentPowerString == ShieldKeyword) { PlayerController.Shield(); CurrentPowerString = ""; DisplayedPowerText.text = ""; } return; } CurrentPowerString = ""; DisplayedPowerText.text = ""; }