// Start is called before the first frame update void Start() { flowchart = GameObject.Find("Flowchart").GetComponent <Flowchart>(); //creates the SayingMatcher this.sm = new SayingMatcher(keys, solutions); //sets dictionary with player combinations this.playerCombinations = new Dictionary <string, string>(); //initiate keys with empty values for (int i = 0; i < keys.Length; i++) { this.playerCombinations[keys[i]] = null; } //sets line to be drawn between objects lines = new Dictionary <string, Line>(); for (int i = 0; i < keys.Length; i++) { //initiates lines, currently with no start or end points Line l = new Line(null, null, CreateLineObject()); lines.Add(keys[i], l); } instance = this; PlayWelcomeMessage(); }
//destroys gameobjects not needed after scene, and resets static variables static void TearDownScene() { instance.teardown = true; foreach (string k in lines.Keys) { Line l = lines[k]; GameObject go = l.lineObject; Destroy(go); } lines = null; selectedKey = null; selectedValue = null; colorIndex = 0; instance = null; }
void OnMouseDown() { Puzzle1Level2.CheckCorrectAnswers(); }
public void OnMouseDown() { Puzzle1Level2.SetSelected(isKey, this); }