public void RemoteTriggerExplosion(Vector3 position, float explosionRadius) { kamikazeAttackSwarm.ActivateExplosion(position, explosionRadius * 10); //Increase the effect of explosion for kamikazeSwarm enemySwarm.ActivateExplosion(position, explosionRadius); var obj = Instantiate(explosionPrefab, position, Quaternion.identity); obj.GetComponent <Explosion>().explosionRadius = explosionRadius * 1.2f; //Make explosion animation a bit larger than actual explosion }