Ejemplo n.º 1
0
    public void ResponseP2Correct(ExtendedEventArgs eventArgs)
    {
        ResponseP2CorrectEventArgs args = eventArgs as ResponseP2CorrectEventArgs;

        Debug.Log("Value is: " + args.trigger);
        if (args.trigger == 1)
        {
            GameObject trigger = GameObject.FindGameObjectWithTag("Puzzle2");
            // Moves podium for puzzle 2 in player 1 room
            trigger.GetComponent <Interact_Correct>().slideStay.tileStepped = true;
            EnableRender[] wall = trigger.GetComponent <ActivateRender>().rend;
            trigger.GetComponent <Interact_Correct>().ePressed = true;

            // Flip walls to be rendered for pulling the correct lever trigger
            for (int i = 0; i < wall.Length; i++)
            {
                wall[i].renderObject.enabled = !wall[i].renderObject.enabled;
            }
        }
        else if (args.trigger == 2)
        {
            // Open both walls to continue to puzzle 3 for both players
            GameObject         trigger      = GameObject.FindGameObjectWithTag("Puzzle2Finish");
            Interact_Correct[] puzzle2Walls = trigger.GetComponents <Interact_Correct>();

            for (int i = 0; i < puzzle2Walls.Length; i++)
            {
                puzzle2Walls[i].ePressed = true;
                puzzle2Walls[i].slideStay.tileStepped = true;
            }
        }
    }
Ejemplo n.º 2
0
    public override ExtendedEventArgs process()
    {
        ResponseP2CorrectEventArgs args = null;

        args         = new ResponseP2CorrectEventArgs();
        args.trigger = trigger;
        Debug.Log("Puzzle 2 trigger is: " + trigger);
        return(args);
    }