Example #1
0
 void Awake()
 {
     s1 = transform.Find("LogicSwitch Left/Output").GetComponent<LogicOutput>();
     s2 = transform.Find("LogicSwitch Middle/Output").GetComponent<LogicOutput>();
     s3 = transform.Find("LogicSwitch Right/Output").GetComponent<LogicOutput>();
     output = transform.Find("Output").GetComponent<LogicOutput>();
 }
Example #2
0
 public override void Init()
 {
     Outputs = new LogicOutput[] { new LogicOutput(this, 0, typeof(BooleanValue)) };
     Inputs = new LogicInput[] {
         new LogicInput(this, 0, typeof(BooleanValue)),
         new LogicInput(this, 1, typeof(BooleanValue))
     };
 }
Example #3
0
    void Awake()
    {
        handle = transform.Find("Handle");
        handleMat = handle.GetComponent<MeshRenderer>().material;
        output = transform.Find("Output").GetComponent<LogicOutput>();
        sound = handle.GetComponents<AudioSource>();
        timerSound = transform.Find("Timer/TimerAudio").GetComponents<AudioSource>();
        timerNeedle = transform.Find("Timer/TimerNeedle");
        timerFace = transform.Find("Timer/TimerFace").GetComponent<MeshRenderer>().material;
        if (!timerNeedle.gameObject.activeInHierarchy)
            timerNeedle = null;

        // If this switch is supposed to start on, make it flip immediately

        if (startOn)
        {
            flipTime = 0.01f;
            interact(0);
        }
    }
Example #4
0
 void Awake()
 {
     input = transform.Find("Input").GetComponent<LogicInput>();
     output = transform.Find("Output").GetComponent<LogicOutput>();
 }
Example #5
0
 void Awake()
 {
     output = transform.Find("Output").GetComponent<LogicOutput>();
     lightSign = transform.Find("Light").GetComponent<MeshRenderer>();
 }