Example #1
0
        private void Start()
        {
            listener.AddKey(new List <KeyCode> {
                KeyCode.Return
            }, SelectOption);
            listener.AddKey(new List <KeyCode> {
                KeyCode.Space
            }, SelectOption);
            listener.AddKey(new List <KeyCode> {
                KeyCode.UpArrow
            }, Previous);
            listener.AddKey(new List <KeyCode> {
                KeyCode.DownArrow
            }, Next);

            monitor.CalibrateTextMesh();
            monitor.uiCursor.Show(true);
            monitor.uiCursor.Blink(false);

            WriteOptionsToLayer();

            _optionNumber = 0;

            monitor.uiCursor.SelectRow(_optionNumber + layer.view.externalPosition.row);
        }
Example #2
0
    // Start is called before the first frame update
    private void Start()
    {
        if (Tools.CheckError(monitor == null, "No Monitor object has been added"))
        {
            return;
        }
        if (Tools.CheckError(keyListener == null, "No KeyListener object has been added"))
        {
            return;
        }

        keyListener.AddKey(new List <KeyCode> {
            KeyCode.Space
        }, GoToPuzzle);
        keyListener.AddKey(new List <KeyCode> {
            KeyCode.Home
        }, LoadStartMenu);


        _puzzleLayer  = monitor.NewLayer(false);
        _controlLayer = monitor.NewLayer(false);

        _prefaceLayer  = monitor.NewLayer();
        _continueLayer = monitor.NewLayer();

        _continueLayer.view.SetExternalPosition(new GridPosition(23, 0));

        _puzzleLayer.view.SetExternalPosition(new GridPosition(3, 17));
        _puzzleLayerOffset = _puzzleLayer.view.externalPosition;

        _controlLayer.view.SetExternalPosition(new GridPosition(21, 0));
        _controlLayer.zIndex = 1;

        monitor.CalibrateTextMesh();

        monitor.uiCursor.Show(true);
        monitor.uiCursor.Blink(true);
        monitor.uiCursor.linkedLayer = _continueLayer;


        _switches        = new List <LogicGates.Switch>(6);
        _switchPositions = new List <GridPosition>(6)
        {
            new GridPosition(12, 1),
            new GridPosition(12, 9),
            new GridPosition(12, 17),
            new GridPosition(12, 25),
            new GridPosition(12, 33),
            new GridPosition(12, 41)
        };
        _selectedSwitch = 0;

        LoadPreface();
    }