public void SpawnPuck(int owner) { Vector3 pos = new Vector3(Random.Range(deadZone, spawnAreaWidth / 2f), Random.Range(-(spawnAreaHeight / 2f), spawnAreaHeight / 2f), 0); if (owner == 1) { pos.x = -pos.x; } Puck newPuck = Instantiate(puckPrefabs, pos, Quaternion.identity).GetComponent <Puck>(); newPuck.SwitchOwner(owner); if (Random.Range(0f, 100f) < specialPuckSpawnChance) { newPuck.SetSpecialPuck(); } }