void MakeClue(int value, int x, int y, ClueType t, int group) { GameObject c = Instantiate(Clue, new Vector3(x, y, 0), Quaternion.identity) as GameObject; ClueBehavior b = c.GetComponent <ClueBehavior>(); b.clueValue = value; b.clueType = t; b.clueGroup = group; }
void crossout(GameObject g) { ClueBehavior c = g.GetComponent <ClueBehavior>(); if (!c.autoCrossOut) { c.SetAutoCrossOut(); } }
PuzzleLine createLine(List <GameObject> clues, List <GameObject> cells) { List <bool> open = new List <bool>(); List <bool> kitties = new List <bool>(); List <int> clueValues = new List <int>(); foreach (GameObject cell in cells) { BoxBehaviour b = cell.GetComponent <BoxBehaviour>(); open.Add(b.isOpen); kitties.Add(b.kitty); } foreach (GameObject clue in clues) { ClueBehavior c = clue.GetComponent <ClueBehavior>(); clueValues.Add(c.clueValue); } return(new PuzzleLine(open, kitties, clueValues, clues)); }