public void SpawnRandomPowerUp() { var pt = boundary.GetRandomPoint(); PowerUp powerUp = GameObject.Instantiate <PowerUp>(powerUpPrefab) as PowerUp; powerUp.transform.position = pt; var p = (PowerUpType)Random.Range(0, 3); //var p = PowerUpType.Reflector; powerUp.Init(p); }