using System.Collections; using System.Collections.Generic; using UnityEngine; public class DirectionPaddle : MonoBehaviour { public GameObject piston; public GameObject visuals; public void Switch() { gameObject.SetActive(!gameObject.activeSelf); } public void InteractNode() { GetComponent().Play(); this.GetComponent().enabled = !this.GetComponent().enabled; this.GetComponent().enabled = !this.GetComponent().enabled; piston.SetActive(!piston.activeSelf); visuals.SetActive(!visuals.activeSelf); } }