Ejemplo n.º 1
0
    void OnTriggerExit(Collider other)
    {
        var interObj = other.GetComponent <InterractableObject> ();

        if (interObj != null && interObj.Fire)
        {
            elapsedTime = 0;
            interObject = null;
        }
    }
Ejemplo n.º 2
0
    void OnTriggerEnter(Collider other)
    {
        var interObj = other.GetComponent <InterractableObject> ();

        if (interObj != null && interObj.Fire && interObj.Activated)
        {
            elapsedTime = 0;
            interObject = interObj;
        }
    }
Ejemplo n.º 3
0
    public void ActivateNextValve(InterractableObject current)
    {
        InterractableObject valve = null;

        do
        {
            valve = Valves [Random.Range(0, Valves.Count)];
        } while(valve == current);
        valve.Activated = true;
        Indicator.Valve = valve;
    }
Ejemplo n.º 4
0
    public void ActivateNextFire(InterractableObject current)
    {
        InterractableObject fire = null;

        do
        {
            fire = Fires [Random.Range(0, Fires.Count)];
        } while(fire == current);
        fire.Activated = true;
        fire.gameObject.SetActive(true);
        Indicator.Fire = fire;
    }