protected new void Start() { base.Start(); Background.SetBackgroundColor(Color.black); _textStyle = new GUIStyle(); _textStyle.alignment = TextAnchor.MiddleCenter; _textStyle.normal.textColor = Color.white; _puzzle = gameObject.AddComponent <LightsOutScript>(); _previousInput = mainmenu.Escape; mainmenu.Escape = new InputStruct(KeyCode.Escape); _puzzle.Open(); (_solver = gameObject.AddComponent <LightsOutSolver>()).enabled = false; int keypressed = MyInputs.GetNumberPressed(Input.GetKey); if (Input.GetKey(KeyCode.P)) { keypressed += 10; } else if (keypressed < 2) { keypressed = 10; } //Debug.Log(keypressed); _puzzle.CreateBoard(keypressed, keypressed, Color.red, Color.green); LightsOutScript.ActiveDdebug = true; LightsOutScript.Square.EdgeSizeRatio = 50f / 1920f; }
private void Awake() { _lightsOutVars = this.SearchComponent <LightsOutScript>(); }