void endEffect() { playerWeapon playerScript = player.GetComponent <playerWeapon>(); playerScript.powerUp(false, type); Destroy(gameObject); }
void startEffect() { playerWeapon playerScript = player.GetComponent <playerWeapon>(); playerScript.powerUp(true, type); GetComponent <SpriteRenderer>().enabled = false; GetComponent <CircleCollider2D>().enabled = false; }