Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assets/Custom Prefabs/PowerUp_FireRate.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b8905066d849e3944bbbb17f3776ca52, type: 3}
m_Name:
m_EditorClassIdentifier:
expirationTime: 5
expirationTime: 4
rotationSpeed: 50
powerUpSpawnPoint: {fileID: 0}
--- !u!114 &5716998968590968352
Expand Down
2 changes: 1 addition & 1 deletion Assets/Custom Prefabs/PowerUp_Health.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b8905066d849e3944bbbb17f3776ca52, type: 3}
m_Name:
m_EditorClassIdentifier:
expirationTime: 8
expirationTime: 7
rotationSpeed: 50
powerUpSpawnPoint: {fileID: 0}
--- !u!114 &-5039156414163452671
Expand Down
2 changes: 1 addition & 1 deletion Assets/Custom Prefabs/WaveOpponent 1.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
moveSpeed: 3
projectilePrefab: {fileID: 797301889827987112, guid: 4197375377e23034786c0bbfc3ea0d82, type: 3}
projectilePrefab: {fileID: 797301889827987112, guid: 7ac0f1677a4d0f24eb23653f1a63b96e, type: 3}
projectileSpeed: 10
shootInterval: 1
shootPoint: {fileID: 2967891984739395255}
Expand Down
11 changes: 3 additions & 8 deletions Assets/Scenes/Level 1.unity
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &342649279
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -922,7 +922,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &507643789
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1461,11 +1461,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e0783a216b0f71748ad6c7fbf6e9873c, type: 3}
m_Name:
m_EditorClassIdentifier:
waves:
- {fileID: 11400000, guid: e9de328cc6093144bb61fa904cc1d5d2, type: 2}
miniBossWave: {fileID: 0}
finalBossWave: {fileID: 0}
miniBossEveryXLevels: 3
levelCompleteUI: {fileID: 1778946783}
--- !u!1 &715389602
GameObject:
Expand Down Expand Up @@ -2443,7 +2438,7 @@ MonoBehaviour:
spawnPoints:
- {fileID: 1459832791}
- {fileID: 715389603}
spawnInterval: 5
spawnInterval: 10
--- !u!4 &1363776800 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1634862204795693691, guid: 0a4df1c971f7c9343a0752ddeea295a7, type: 3}
Expand Down
8 changes: 0 additions & 8 deletions Assets/Scripts/Opps/EnemyBullet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ public class EnemyBullet : BaseBullet
protected override void OnCollisionEnter(Collision other)
{
Debug.Log($"EnemyBullet collided with: {other.gameObject.name}");

// Check for player bullet collision
if (other.gameObject.CompareTag("Player Bullet"))
{
Destroy(other.gameObject);
Destroy(gameObject);
return;
}

// Check for scene collision
if (other.gameObject.CompareTag("Scene"))
Expand Down
13 changes: 10 additions & 3 deletions Assets/Scripts/PowerUps/PowerUpSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,23 @@ private void SpawnPowerUp()
}

// Select one random spawn point
int powerUpsToSpawnCount = Mathf.Min(spawnPoints.Length, availableSpawnPoints.Count);
List<int> selectedSpawnPointIndices = new List<int>();
if (availableSpawnPoints.Count > 0)
for (int i = 0; i < powerUpsToSpawnCount; i++)
{
if (availableSpawnPoints.Count == 0)
{
break;
}

int randomIndex = Random.Range(0, availableSpawnPoints.Count);
selectedSpawnPointIndices.Add(availableSpawnPoints[randomIndex]);
int selectedSpawnPointIndex = availableSpawnPoints[randomIndex];
selectedSpawnPointIndices.Add(selectedSpawnPointIndex);
availableSpawnPoints.RemoveAt(randomIndex);
}

foreach (int spawnPointIndex in selectedSpawnPointIndices)
{
// todo: add offset if necessary
Vector3 spawnPosition = spawnPoints[spawnPointIndex].position;

// Instantiate a random power-up prefab
Expand Down