23 lines
608 B
C#
23 lines
608 B
C#
using UnityEngine;
|
|
|
|
public class SelectorBrain : NanoBrain {
|
|
public Vector3 input1;
|
|
public Vector3 input2;
|
|
public Vector3 output;
|
|
|
|
public Receptor receptor1;
|
|
public Receptor receptor2;
|
|
|
|
protected void Awake() {
|
|
receptor1 = Receptor.CreateReceptor(this.brain, "Selector");
|
|
receptor2 = Receptor.CreateReceptor(this.brain, "Selector");
|
|
}
|
|
|
|
protected void Update() {
|
|
receptor1.ProcessStimulus(0, input1);
|
|
receptor2.ProcessStimulus(1, input2);
|
|
output = this.brain.outputValue;
|
|
|
|
this.brain.UpdateNuclei();
|
|
}
|
|
} |