Added NanoBrain namespace
This commit is contained in:
parent
8e441f86ff
commit
334a4418c0
@ -1,2 +1,11 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c7539a20f7894542ca347730cd8417b1
|
guid: c7539a20f7894542ca347730cd8417b1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|||||||
8
NanoBrain/LinearAlgebra.meta
Normal file
8
NanoBrain/LinearAlgebra.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 95cffa531715fe90fb47659db696b546
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
NanoBrain/LinearAlgebra/src.meta
Normal file
8
NanoBrain/LinearAlgebra/src.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 03873b853d7b84b6994976eed0819d67
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
NanoBrain/LinearAlgebra/test.meta
Normal file
8
NanoBrain/LinearAlgebra/test.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7e3187503d0b7b9bfa2214c94b923c12
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,9 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using NanoBrain;
|
||||||
|
|
||||||
namespace Passer.CreatureControl {
|
namespace Passer.CreatureControl {
|
||||||
|
|
||||||
[RequireComponent(typeof(NanoBrain))]
|
[RequireComponent(typeof(NanoBrain.NanoBrain))]
|
||||||
public class Ant : Insect {
|
public class Ant : Insect {
|
||||||
private readonly float inertia = 0.2f;
|
private readonly float inertia = 0.2f;
|
||||||
private readonly float smellRadius = 0.2f;
|
private readonly float smellRadius = 0.2f;
|
||||||
@ -15,7 +16,7 @@ namespace Passer.CreatureControl {
|
|||||||
public AntennaTouch touchLeft;
|
public AntennaTouch touchLeft;
|
||||||
public AntennaTouch touchRight;
|
public AntennaTouch touchRight;
|
||||||
|
|
||||||
public NanoBrain nanoBrain;
|
public NanoBrain.NanoBrain nanoBrain;
|
||||||
// brain output
|
// brain output
|
||||||
public Neuron hasFood;
|
public Neuron hasFood;
|
||||||
// brain input
|
// brain input
|
||||||
@ -36,7 +37,7 @@ namespace Passer.CreatureControl {
|
|||||||
if (this.targetRig != null)
|
if (this.targetRig != null)
|
||||||
this.animator = this.targetRig.animator;
|
this.animator = this.targetRig.animator;
|
||||||
|
|
||||||
this.nanoBrain = GetComponentInChildren<NanoBrain>();
|
this.nanoBrain = GetComponentInChildren<NanoBrain.NanoBrain>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Init
|
#endregion Init
|
||||||
|
|||||||
@ -1,17 +1,18 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using NanoBrain;
|
||||||
|
|
||||||
namespace Passer.CreatureControl {
|
namespace Passer.CreatureControl {
|
||||||
|
|
||||||
public class Mouth : MonoBehaviour {
|
public class Mouth : MonoBehaviour {
|
||||||
public GameObject foodPrefab;
|
public GameObject foodPrefab;
|
||||||
public NanoBrain nanoBrain;
|
public NanoBrain.NanoBrain nanoBrain;
|
||||||
|
|
||||||
public Neuron havingFood;
|
public Neuron havingFood;
|
||||||
public Nucleus enableFoodPheromones;
|
public Nucleus enableFoodPheromones;
|
||||||
|
|
||||||
void Awake() {
|
void Awake() {
|
||||||
this.nanoBrain = GetComponentInParent<NanoBrain>();
|
this.nanoBrain = GetComponentInParent<NanoBrain.NanoBrain>();
|
||||||
if (this.nanoBrain == null || this.nanoBrain.brain == null)
|
if (this.nanoBrain == null || this.nanoBrain.brain == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user