Interact() public method

public Interact ( ) : void
return void
    IEnumerator ToggleSwitch()
    {
        yield return(new WaitForSeconds(0.1f));

        while (true)
        {
            yield return(new WaitForSeconds(Random.Range(minDelay, maxDelay)));

            switchToToggle.Interact();
        }
    }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (_controller.CanControl)
     {
         if (Input.GetButtonDown("Interact"))
         {
             if (_interactableObj != null)
             {
                 Switch pSwitch = _interactableObj.GetComponent <Switch>();
                 pSwitch.Interact(gameObject);
             }
         }
     }
 }
Exemplo n.º 3
0
 protected override void DoAction()
 {
     m_Switch.Interact();
 }