Ejemplo n.º 1
0
        private void removeObjectsFromScene()
        {
            removeList.Clear();
            foreach (var item in gameScene.sceneObjects)
            {
                if (item is IUnit unit)
                {
                    if (unit.Remove)
                    {
                        removeList.Add(unit);
                    }
                }
            }

            foreach (var item in removeList)
            {
                SoundEngine.PlaySoundEffect(SoundEffectType.COIN_DROP);
                gameScene.removeItem(item);
            }
        }