Created
September 18, 2025 09:49
-
-
Save MidnytRaccoon/dfc8114087fc85deaffe49c67771e1bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| List<Vector2> enemyPositions = new List<Vector2>(); | |
| // Add enemies | |
| enemyPositions.Add(new Vector2(100, 200)); | |
| enemyPositions.Add(new Vector2(300, 400)); | |
| // Move enemies | |
| for (int i = 0; i < enemyPositions.Count; i++) | |
| { | |
| enemyPositions[i] = new Vector2(enemyPositions[i].X - 2, enemyPositions[i].Y); | |
| } | |
| // Remove an enemy (e.g., defeated) | |
| enemyPositions.RemoveAt(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment