Exemplo n.º 1
0
    public override void OnPointerClick()
    {
        ScenesController scenesController =
            GameObject.FindGameObjectWithTag("ScenesController").GetComponent <ScenesController>();

        scenesController.OnFinishedMaze(true);
    }
Exemplo n.º 2
0
    /*
     * Updates the player state every frame
     */
    private void Update()
    {
        if (InputController.GetButtonUp(InputController.GetPS4ButtonName("L3")))
        {
            lantern.ToggleLantern();
        }
        PlayerMovement();

        if (health <= 0 || InputController.GetButtonUp(InputController.GetPS4ButtonName("PS")))
        {
            ScenesController scenesController =
                GameObject.FindGameObjectWithTag("ScenesController").GetComponent <ScenesController>();
            scenesController.OnFinishedMaze(false);
        }
    }