destroy objects with var isMarked : boolean = true;

hello

in my "memory game" i have in a scene 16 game objects now i compare 2 cards and if they have the same material i marked them with a

var isMarked : boolean = true;

now how i will find this two cards in my scene with this var?

var allCards = FindObjectsOfType(CardScript);
for (var card : CardScript in allCards) {
    if(card.isMarked == true){
        //do something
    }
}

Note that I made up the name CardScript, put whatever the actual name of your script that contains the isMarked var in there.

i will try this, thank you very much Derek ! :)