// Start is called before the first frame update void Start() { Speed = 5; Health = 5; BulletPowerUp = PowerUp.BulletPowerUp.None; PlayerPowerUp = PowerUp.PlayerPowerUp.None; InstantiateHealthbar(); Debug.Log("Game started."); transform.position = new Vector2(0, -4); Score = 0; // Iterate over powerup enum and map each prefab with each powerup int i = 0; foreach (BulletType bullet in BulletType.GetValues(typeof(PowerUp.BulletPowerUp))) { if (i >= bulletPrefabs.Count) { break; } bulletMap.Add(bullet, bulletPrefabs[i]); i++; } }