void AIUpdate() { if (m_synapseBrain.Process() == false) { m_target = null; } }
void AIUpdate() { if(m_synapseBrain.Process() == false) { m_target = null; } }
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(); }
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); } }
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)); } }
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); } }
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; } }
void DesireCoolCallback() { m_target = null; }
void DesirePickCallback(object a_collectible) { m_target = a_collectible as CollectibleValue; }
void DesireCoolCallback() { m_target = null; }
void DesirePickCallback(object a_collectible) { m_target = a_collectible as CollectibleValue; }