55 lines
1.1 KiB
C#
55 lines
1.1 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);
|
|
|
|
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 CloneTo(ClusterPrefab parent);
|
|
public IReceptor Clone();
|
|
}
|
|
|