1118OPSSNew/Assets/Zion/Scripts//SpecialDrive.cs

38 lines
995 B
C#

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<MechanismsDriver>();
//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()
{
}
}