September 2010
Beginner
384 pages
8h 49m
English
We'll write some logic so that the cards show one image or another depending on whether or not they've been flipped over.
BuildGrid function:if(GUILayout.Button(Resources.Load(card.img), GUILayout.Width(cardW)))
card.img to img so that the line reads like this:if(GUILayout.Button(Resources.Load(img), GUILayout.Width(cardW)))
card variable definition:var card:Object = aGrid[i][j];
var img:String;
if(card.isFaceUp)
{
img = card.img;
}
else
{
img = "wrench";
}
function BuildGrid() { UILayout.BeginVertical(); ...Read now
Unlock full access