/* * authors: mark joshwel, ryan lin * date: 10/8/2024 * description: lift button behaviour implementation */ using UnityEngine; /// /// lift button behaviour implementation /// public class LiftButtonInteractable : CommonInteractable { /// /// the number of floors the lift will move /// public int floorsMoved; /// /// the lift the button is controlling /// [SerializeField] private LiftController liftController; [SerializeField] private Door door; /// /// a function to interact with the lift /// public override void Interact() { if (!liftController.moving && !door.isOpen) StartCoroutine(liftController.Move(floorsMoved)); } }