コード例 #1
0
ファイル: Mob.cs プロジェクト: SamOatesJams/Ludumdare33
        /// <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>();
        }
コード例 #2
0
ファイル: Mob.cs プロジェクト: SamOatesJams/Ludumdare33
        /// <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>();
        }