void Update()
    {
        if (GetComponent <InteractableBase>().m_active)
        {
            m_state    = GetComponent <InteractableBase>().m_state;
            m_modified = false;
            ChangeBehaviour();
            GetComponent <InteractableBase>().m_active = false;
        }

        if (m_modified)
        {
            if (Time.time - m_changeStart >= m_waitLength)
            {
                m_imageNum++;
                if (m_imageNum >= m_textures.Length)
                {
                    m_imageNum = 2;
                }
                ChangeTexture(m_imageNum);
                m_changeStart = Time.time;
            }
        }
        else if (m_toggle && gameObject.GetComponent <InteractableBase>().m_inUse)
        {
            m_imageNum = m_activeScreen;
            ChangeTexture(m_imageNum);
        }
        else
        {
            m_imageNum = m_screenSaverNum;
            ChangeTexture(m_imageNum);
        }
    }
Exemplo n.º 2
0
 void ResetBehaviour()
 {
     m_state = GetComponent <InteractableBase>().m_state;
     m_animator.SetBool("m_open", false);
     m_animator.SetBool("m_triggered", false);
     m_toggle = false;
 }
Exemplo n.º 3
0
    void Update()
    {
        if (!m_toggle)
        {
            if (gameObject.GetComponent <InteractableBase>().m_inUse)
            {
                m_animator.SetBool("m_triggered", true);
                m_animator.SetBool("m_open", true);
            }
            else
            {
                m_animator.SetBool("m_triggered", false);
                m_animator.SetBool("m_open", false);
            }
        }


        if (GetComponent <InteractableBase>().m_active)
        {
            m_state = GetComponent <InteractableBase>().m_state;
            ChangeBehaviour();
            GetComponent <InteractableBase>().m_active = false;
        }

        if (m_animator.speed == 0.1f && m_state != PlayerAbilities.InteractableStates.MODIFY)
        {
            m_animator.speed = 2.0f;
        }
    }
    void ResetBehaviour()
    {
        m_state = GetComponent <InteractableBase>().m_state;

        m_animator.SetBool("m_nworking", false);
        m_animator.SetBool("m_working", false);
        m_animator.SetBool("m_swap", false);
        m_toggle = false;
    }
Exemplo n.º 5
0
 void ResetBehaviour()
 {
     m_state = GetComponent <InteractableBase>().m_state;
     m_sprayWater.SetActive(false);
     m_floorWater.SetActive(false);
     m_animator.SetBool("m_swap", false);
     m_animator.SetBool("m_spray", false);
     m_toggle = false;
 }
 public ObjectReference(GameObject _object, InteractableManager.ObjectType _type,
                        PlayerAbilities.InteractableStates _state, Vector3 _position, bool _inUse)
 {
     m_object   = _object;
     m_type     = _type;
     m_state    = _state;
     m_position = _position;
     m_inUse    = _inUse;
     m_tagged   = false;
 }
Exemplo n.º 7
0
    public bool m_inUse;                          //set ture when NPC is using it

    public void SetState(PlayerAbilities.InteractableStates _state)
    {
        //if(_state == PlayerAbilities.InteractableStates.TOGGLE
        //    && m_state == PlayerAbilities.InteractableStates.TOGGLE)
        //{
        //    _state = PlayerAbilities.InteractableStates.NORMAL;
        //}
        m_state  = _state;
        m_active = true;
    }
    void ResetBehaviour()
    {
        m_state = GetComponent <InteractableBase>().m_state;

        m_animator.SetBool("m_printerWorking", false);
        m_animator.SetBool("m_printerNWork", false);
        m_animator.SetBool("m_printerSpit", false);
        m_animator.SetBool("m_prinerNorm", false);

        m_toggle = false;
    }
Exemplo n.º 9
0
    void ResetBehaviour()
    {
        m_state = GetComponent <InteractableBase>().m_state;

        m_animator.SetBool("m_blocked", false);
        m_animator.SetBool("m_broken", false);
        m_animator.SetBool("m_using", false);

        particle.SetActive(false);

        m_toggle = false;
    }