Exemplo n.º 1
0
    void Start()
    {
        setStage(GameStage.accident);
        setState(GameState.intro);
        sonar = player.GetComponent <HapticSonar>();
        sonar.setObjectToFind(objects[0]);

        /*sonar.setObjectToFind(objects[4]);
         * setStage(GameStage.boite_a_musique);
         * setState(GameState.souvenir);*/
    }
Exemplo n.º 2
0
    void OnTriggerEnter(Collider other)
    {
        focus        = other.gameObject;
        interacting  = false;
        interactTime = 0.0f;
        filledInteraction.fillAmount = 0.0f;
        HapticSonar sonar = GameManager.getInstance().getHaptic();

        if (sonar.getTarget() == focus)
        {
            interactionButton.fillAmount = 1.0f;
            this.canInteract             = true;
        }
        else
        {
            this.canInteract = false;
        }
        Debug.Log("c");
    }