Ejemplo n.º 1
0
 /// </inheritdoc>/>
 public void Warp(Vector3 pos)
 {
     if (RagdollEnabled)
     {
         ragdoll.DisableRagdoll(true);
     }
     navMeshAgent.isStopped = true;
     navMeshAgent.Warp(pos);
     navMeshAgent.isStopped = false;
     assignedZone           = AIZone.GetZoneByPos(pos);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Register the entity in the AIManager and assign the AIZone for it based on its position.
        /// </summary>
        public void RegisterAI(AIEntity ai)
        {
            ais.Add(ai);

            AIZone zone = AIZone.GetZoneByPos(ai.transform.position);

            if (zone == null)
            {
                zone = AIZone.CreateSceneSizeZone();
            }

            zone.AddAI(ai);

            UpdateAttackOrder();
        }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     zone = AIZone.GetZoneByPos(transform.position);
 }