/// <summary> /// /// </summary> private void Start() { var server = GameObject.FindGameObjectWithTag("Server"); if (server != null) { this.IsServer = true; this.ID = this.gameObject.GetInstanceID(); m_server = server.GetComponent <Realms.Server.ServerMain>(); m_server.RegisterMob(this); } m_animator = this.GetComponent <Animator>(); m_navAgent = this.GetComponent <NavMeshAgent>(); }
/// <summary> /// /// </summary> private void Start() { var server = GameObject.FindGameObjectWithTag("Server"); if (server != null) { this.IsServer = true; this.ID = this.gameObject.GetInstanceID(); m_server = server.GetComponent<Realms.Server.ServerMain>(); m_server.RegisterMob(this); } m_animator = this.GetComponent<Animator>(); m_navAgent = this.GetComponent<NavMeshAgent>(); }