/// </inheritdoc>/> public void Warp(Vector3 pos) { if (RagdollEnabled) { ragdoll.DisableRagdoll(true); } navMeshAgent.isStopped = true; navMeshAgent.Warp(pos); navMeshAgent.isStopped = false; assignedZone = AIZone.GetZoneByPos(pos); }
/// <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(); }
private void OnEnable() { zone = AIZone.GetZoneByPos(transform.position); }