Single smell works
This commit is contained in:
parent
a651ec6e15
commit
33ea14bb72
@ -7,7 +7,11 @@ using System.Collections;
|
||||
|
||||
namespace NanoBrain {
|
||||
[CustomPropertyDrawer(typeof(Neuron))]
|
||||
class NeuronDrawer : PropertyDrawer {
|
||||
class Neuron_Drawer : PropertyDrawer {
|
||||
public static void Insepctor(SerializedObject serializedObject, string propertyName ) {
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty(propertyName));
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
|
||||
// Draw foldout + properties
|
||||
label = EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
@ -284,8 +284,8 @@ namespace NanoBrain {
|
||||
}
|
||||
public Action WhenFiring;
|
||||
|
||||
|
||||
public virtual bool isSleeping => false;// Time.time - this.lastUpdate > this.timeToSleep; //this.outputMagnitude == 0;
|
||||
public bool persistOutput = false;
|
||||
public virtual bool isSleeping => persistOutput ? false : (Time.time - this.lastUpdate > this.timeToSleep);
|
||||
public void SleepCheck() {
|
||||
if (this.isSleeping) {
|
||||
#if UNITY_MATHEMATICS
|
||||
@ -330,6 +330,7 @@ namespace NanoBrain {
|
||||
|
||||
protected virtual void CloneFields(Neuron clone) {
|
||||
clone.bias = this.bias;
|
||||
clone.persistOutput = this.persistOutput;
|
||||
clone.combinator = this.combinator;
|
||||
clone.curve = this.curve;
|
||||
clone.curvePreset = this.curvePreset;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user