Ejemplo n.º 1
0
    private void Start()
    {
        select = new LinqSelect(this);

        Get <KMSelectable>().Assign(onHighlight: () => ModuleHighlightable.enabled = true, onHighlightEnded: () => ModuleHighlightable.enabled = false);
        TextSelectable.Assign(onHighlight: () => TextHighlightable.enabled         = true, onHighlightEnded: () => TextHighlightable.enabled = false);
        Buttons.Assign(onHighlight: (i) => ButtonHighlightables[i].enabled         = true, onHighlightEnded: (i) => ButtonHighlightables[i].enabled = false);

        TextSelectable.Assign(onInteract: select.TextPress);
        Buttons.Assign(onInteract: select.ButtonPress);
    }
Ejemplo n.º 2
0
    //base functions, made easy with keep coding!

    private void Start()
    {
        routine = new Routine <int>(OnSubmit, this);

        Buttons.Assign(onInteract: HandleButtons);
        Screen.Assign(onInteract: HandleScreen);

        int locationSeed = Rnd.Range(0, _tableValues.Length),
            movementSeed = Rnd.Range(1, 5);

        Log("hexOrbits loaded! Starting at location {0}, with {1}-step movement.".Form(locationSeed + 1, movementSeed));

        //pointer locations are actually all predetermined from the start! the manual technically lies!

        for (int i = 0; i < stageValues.Length; i++)
        {
            stageValues[i] = _tableValues.ElementAtWrap(locationSeed + (movementSeed * i));
        }

        GetChild <TextMesh>().text = "hexOrbits - Idle";

        Log("The 4 array cells are: {0}, {1}, {2}, {3}. (with locations of: {4}, {5}, {6}, {7})".Form(ToHex(stageValues[0]), ToHex(stageValues[1]), ToHex(stageValues[2]), ToHex(stageValues[3]), locationSeed + 1, (locationSeed + movementSeed + 1) % 64, (locationSeed + (movementSeed * 2) + 1) % 64, (locationSeed + (movementSeed * 3) + 1) % 64));

        Log("This module's solution is {0} (in location {1}), and can be submitted by pressing {2}, {3}.".Form(ToHex(stageValues[4]), (locationSeed + (movementSeed * 4) + 1) % 64, _directions[stageValues[4] / 4], _directions[stageValues[4] % 4]));
    }
Ejemplo n.º 3
0
    // Use this for initialization
    private void Start()
    {
        routine = new Routine <int>(EntityCollision, this);

        Screen.Assign(onInteract: HandleScreen);
        Buttons.Assign(onInteract: HandleButtons);

        GenerateSolution();
        CreateQueue();



        GetChild <TextMesh>().text = "hexNull\nIdle";
    }
    private void Start()
    {
        CreateMarqueeLights();
        correctFrequency    = UnityEngine.Random.Range(0, frequencies.Count);
        currentMarqueeQueue = MorseCode.CreateMarqueeQueue(words[correctFrequency]);
        SetNeedleAtLerp(0f);
        DisplayCurrentFrequency();
        LeftButton.Assign(onInteract: MoveLeft);
        RightButton.Assign(onInteract: MoveRight);
        TransmitButton.Assign(onInteract: Transmit);

        LitLabels.ForEach(r => r.enabled         = false);
        Needle.GetComponent <Renderer>().enabled = false;

        Log("Correct word: {0} ({1} MHz)", words[correctFrequency], frequencies[correctFrequency]);
    }