//Dequeue for indicator pooling void UpdateEnemyIndicators() { //TODO: update when an enemy destroyed LinkedListNode <Image> it = indicatorLList.First; for (int i = 0; i < gameManager.enemyList.Count; i++) { MovingAgent agent = gameManager.enemyList[i]; //Create new when all available indicators are used if (it == null) { InitiateIndicator(); it = indicatorLList.Last; } if (!agent.IsVisible()) { Image indicatorImg = it.Value; indicatorImg.enabled = true; UpdateIndicator(agent, indicatorImg); it = it.Next; } if (i == gameManager.enemyList.Count - 1) { while (it != null && it.Value.enabled == true) { it.Value.enabled = false; it = it.Next; } } } //TODO: update indicators: Update on died enemy, OnVisible, OnInvisible of enemy }