Added NanoBrain namespace

This commit is contained in:
Pascal Serrarens 2026-04-07 17:35:08 +02:00
parent 8e441f86ff
commit 334a4418c0
6 changed files with 41 additions and 6 deletions

View File

@ -1,2 +1,11 @@
fileFormatVersion: 2
guid: c7539a20f7894542ca347730cd8417b1
guid: c7539a20f7894542ca347730cd8417b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 95cffa531715fe90fb47659db696b546
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 03873b853d7b84b6994976eed0819d67
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7e3187503d0b7b9bfa2214c94b923c12
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,9 +1,10 @@
using System.Collections.Generic;
using UnityEngine;
using NanoBrain;
namespace Passer.CreatureControl {
[RequireComponent(typeof(NanoBrain))]
[RequireComponent(typeof(NanoBrain.NanoBrain))]
public class Ant : Insect {
private readonly float inertia = 0.2f;
private readonly float smellRadius = 0.2f;
@ -15,7 +16,7 @@ namespace Passer.CreatureControl {
public AntennaTouch touchLeft;
public AntennaTouch touchRight;
public NanoBrain nanoBrain;
public NanoBrain.NanoBrain nanoBrain;
// brain output
public Neuron hasFood;
// brain input
@ -36,7 +37,7 @@ namespace Passer.CreatureControl {
if (this.targetRig != null)
this.animator = this.targetRig.animator;
this.nanoBrain = GetComponentInChildren<NanoBrain>();
this.nanoBrain = GetComponentInChildren<NanoBrain.NanoBrain>();
}
#endregion Init

View File

@ -1,17 +1,18 @@
using System.Collections.Generic;
using UnityEngine;
using NanoBrain;
namespace Passer.CreatureControl {
public class Mouth : MonoBehaviour {
public GameObject foodPrefab;
public NanoBrain nanoBrain;
public NanoBrain.NanoBrain nanoBrain;
public Neuron havingFood;
public Nucleus enableFoodPheromones;
void Awake() {
this.nanoBrain = GetComponentInParent<NanoBrain>();
this.nanoBrain = GetComponentInParent<NanoBrain.NanoBrain>();
if (this.nanoBrain == null || this.nanoBrain.brain == null)
return;