Beispiel #1
0
 void AIUpdate()
 {
     if (m_synapseBrain.Process() == false)
     {
         m_target = null;
     }
 }
Beispiel #2
0
 void AIUpdate()
 {
     if(m_synapseBrain.Process() == false)
     {
         m_target = null;
     }
 }
Beispiel #3
0
            void Spawn()
            {
                float            x              = Random.Range(-m_spawnDemiWidth, m_spawnDemiWidth);
                float            z              = Random.Range(-m_spawnDemiLength, m_spawnDemiLength);
                GameObject       instance       = GameObject.Instantiate(m_prefabToSpawn, new Vector3(x, 0.25f, z), Quaternion.identity) as GameObject;
                CollectibleValue componentValue = instance.GetComponent <CollectibleValue>();

                componentValue.Init();
            }
Beispiel #4
0
            void OnControllerColliderHit(ControllerColliderHit a_collision)
            {
                CollectibleValue collectible = a_collision.collider.GetComponent <CollectibleValue>();

                if (collectible != null && CollectibleValue.m_instances.Contains(collectible))
                {
                    Points componentPoints = GetComponent <Points>();
                    componentPoints.Add(collectible.Points);

                    CollectibleValue.m_instances.Remove(collectible);
                    Destroy(collectible.gameObject);
                }
            }
Beispiel #5
0
            IEnumerator Start()
            {
                m_target = null;

                m_controller    = GetComponent <CharacterController>();
                m_heatComponent = GetComponent <Heat>();

                m_synapseBrain = new SynapseLibrary_SynapseDemo.Demo.NPC(this);

                while (Application.isPlaying && m_synapseBrain != null)
                {
                    AIUpdate();
                    yield return(new WaitForSeconds(1));
                }
            }
Beispiel #6
0
            IEnumerator Start()
            {
                m_target = null;

                m_controller = GetComponent<CharacterController>();
                m_heatComponent = GetComponent<Heat>();

                m_synapseBrain = new SynapseLibrary_SynapseDemo.Demo.NPC(this);

                while(Application.isPlaying  &&  m_synapseBrain != null)
                {
                    AIUpdate();
                    yield return new WaitForSeconds(1);
                }
            }
Beispiel #7
0
            void OnControllerColliderHit(ControllerColliderHit a_collision)
            {
                CollectibleValue collectible = a_collision.collider.GetComponent <CollectibleValue>();

                if (collectible != null && CollectibleValue.m_instances.Contains(collectible))
                {
                    Points componentPoints = GetComponent <Points>();
                    componentPoints.Add(collectible.Points);

                    CollectibleValue.m_instances.Remove(collectible);
                    Destroy(collectible.gameObject);

                    GameObject   thePlayer = GameObject.Find("ThePlayer");
                    SynapseAgent synapse   = GetComponent <SynapseAgent>();
                    synapse.health  = 100;
                    synapse.counter = 0;
                }
            }
Beispiel #8
0
 void DesireCoolCallback()
 {
     m_target = null;
 }
Beispiel #9
0
 void DesirePickCallback(object a_collectible)
 {
     m_target = a_collectible as CollectibleValue;
 }
Beispiel #10
0
 void DesireCoolCallback()
 {
     m_target = null;
 }
Beispiel #11
0
 void DesirePickCallback(object a_collectible)
 {
     m_target = a_collectible as CollectibleValue;
 }