using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpecialDrive : MonoBehaviour { public ProcessUISwitch targetProcessUI; public MechanismsDriver targetMechanismsDriver; public int targetMechanismsState = 1; // Start is called before the first frame update void Awake() { if (targetMechanismsDriver == null) targetMechanismsDriver = GetComponent(); //else // Debug.Log(gameObject.name + " has targetMechanismsDriver"); if (targetMechanismsDriver != null) { targetProcessUI.actions.Add(() => { Debug.Log(gameObject.name + " has targetMechanismsDriver"); targetMechanismsDriver.forrceDriveState = targetMechanismsState; targetMechanismsDriver.forceDrive = true; }); } } // Update is called once per frame void Update() { } }