public void Triggered(TriggerData td)
 {
     if (td.triggerType == TriggerType.Instant && td.pressed)
     {
         StartCoroutine(LerpToNewTransform());
     }
 }
Example #2
0
 void Triggered(Interactable.TriggerData td)
 {
     if (td.pressed)
     {
         Instantiate(prefabToSpawn, transform.position, transform.rotation);
     }
 }
Example #3
0
 public void Triggered(TriggerData td)
 {
     if (td.pressed)
     {
         isActive = !isActive;
     }
 }
Example #4
0
 void Triggered(Interactable.TriggerData td)
 {
     if (td.pressed)
     {
         td.triggerGameObject.transform.position = Vector3.MoveTowards(td.triggerGameObject.transform.position, risePoint, riseSpeed * Time.deltaTime);
     }
     else
     {
         td.triggerGameObject.transform.position = Vector3.MoveTowards(td.triggerGameObject.transform.position, initialPoint, riseSpeed * Time.deltaTime);
     }
 }
Example #5
0
 void Triggered(Interactable.TriggerData td)
 {
     if (toggleVisibility && td.pressedAmount == 1)
     {
         isHidden = !isHidden;
         gameObject.SetActive(!isHidden);
     }
     else
     {
         isHidden = td.pressedAmount == 0;
         gameObject.SetActive(!isHidden);
     }
 }