public void DealDamage(GameObject minion, int damage, bool applyBurn, bool applySlow) { if (damage == 0) { damage = this.attackDamage; } MinionController minionController = minion.GetComponent <MinionController>(); minionController.ReceiveDamage(damage); minionController.SimpleKnockBack(this.knockbackForce); if (applyBurn) { (int damage, float rate, int ticks)passive = GameObject.FindGameObjectWithTag("FireGem").GetComponent <FireUpgrade>().GetPassiveParameters(); minionController.ApplyBurn(passive.damage, passive.rate, passive.ticks); } if (applySlow) { (float slow, float duration)passive = GameObject.FindGameObjectWithTag("IceGem").GetComponent <IceUpgrade>().GetPassiveParameters(); minionController.ApplySlow(passive.slow, passive.duration); } }