public void OnSpawn() { ActiveSprites.Clear(); foreach (var sprite in Sprites) { sprite.OnSpawn(); } }
private void RecalculateActiveSprites() { ActiveSprites.Clear(); for (int i = 0; i < Sprites.Count; i++) { EnemyStatusSprite sprite = Sprites[i]; if (sprite.IsActive && !ActiveSprites.Contains(sprite)) { ActiveSprites.Add(sprite); } } }