private void Update()
 {
     if (Input.GetKeyDown(KeyCode.E))
     {
         if (curInteractable)
         {
             curInteractable.Activate();
         }
     }
 }
Beispiel #2
0
    public override void OnInspectorGUI()
    {
        Circuit myScript = (Circuit)target;

        if (GUILayout.Button("Activate"))
        {
            myScript.Activate();
        }

        DrawDefaultInspector();
    }
 private void OnTriggerEnter(Collider other)
 {
     circuit.Activate();
 }