IEnumerator startSkill() { transform.GetComponent <Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeAll; player.GetComponent <PlayerController>().SetPlayerAttackState(true); yield return(new WaitForSeconds(0.2f)); transform.GetComponent <Rigidbody2D>().constraints = RigidbodyConstraints2D.None; ParticleSystem EndEffect; ParticleSystem MainEffect; EndEffect = transform.GetChild(0).GetComponent <ParticleSystem>(); MainEffect = transform.GetComponent <ParticleSystem>(); MainEffect.Play(); EndEffect.Stop(); projectile(); StartCoroutine(startMotion()); while (!contact) { yield return(new WaitForEndOfFrame()); } MainEffect.Stop(); EndEffect.Play(); move = false; yield return(new WaitForSeconds(1.5f)); Destroy(this.gameObject); yield return(null); }
private void Awake() { if (Plugin.bloomOnMissEnabled) { Logger.Log("Bloom On Miss™ active"); StartCoroutine(GetScoreController()); _mainEffect = Resources.FindObjectsOfTypeAll <MainEffect>().FirstOrDefault(); _mainEffectParams = _mainEffect?.GetPrivateField <MainEffectParams>("_mainEffectParams"); _flashbangCoroutine = Flashbang(); Logger.Log("BLOOMINATOR 3000 ACTIVATED"); Logger.Log($"Status: {((_mainEffectParams != null) ? "OK" : "ERROR")}"); } }