57 lines
1.2 KiB
C#

using System.Collections.Generic;
using Unity.Mathematics;
public interface INucleus : IReceptor {
#region static struct
// Cluster
public ClusterPrefab cluster { get; }
// Senders
public List<Synapse> synapses { get; }
public Synapse AddSynapse(IReceptor sender, float weight = 1.0f);
public NucleusArray array { get; set; }
#endregion static struct
#region dynamic state
public void UpdateState();
public void UpdateState(float3 inputValue);
#endregion dynamic state
}
public interface IReceptor {
#region static
public string name { get; set; }
// Receivers
public List<INucleus> receivers { get; set; }
public void AddReceiver(INucleus receiver);
public void RemoveReceiver(INucleus receiverNucleus);
#endregion static
#region dynamic
// float3 to prepare for SIMD
public float3 outputValue { get; }
public void UpdateNuclei();
public bool isSleeping { get; }
#endregion dynamic
//public IReceptor ShallowCloneTo(ClusterPrefab parent);
public IReceptor ShallowCloneTo(Cluster parent);
//public IReceptor CloneTo(ClusterPrefab parent);
public IReceptor Clone();
}