public void ActivatePower(GameObject go) { GameObject powerObj = Instantiate(go, this.transform.position + centerEffect, this.transform.rotation); PowerUp power = powerObj.GetComponent <PowerUp>(); power.SetId(this.gameObject.GetInstanceID()); if (power != null) { this.fireSpeed += power.speedBonus; Debug.Log("fireSpeed power : " + fireSpeed); } if (powerBtn != null) { powerBtn.ResetCooldown(); } }