/**
 * Created by rockyl on 2019-11-27.
 */

const {cardListNode, cardCount, badgeName, badgeLabName, dataName} = props;

const listNode = cardListNode || target;
for (let i = 0; i < cardCount; i++) {
	const cardNode = <engine.Container>listNode.getChildAt(i);

	const card0 = cardNode.getChildByName('0');
	card0.visible = true;
	const card1 = cardNode.getChildByName('1');
	card1.visible = false;

	const badge = cardNode.getChildByName(badgeName);
	const badgeLab = badge.getChildByName(badgeLabName);
	badgeLab.text = '${' + dataName + '|' + i + '}';
}
