Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     rb    = GetComponent <Rigidbody>();
     agent = GetComponent <NavMeshAgent>();
     view  = GetComponent <AIView>();
     sword = GetComponentInChildren <Sword>();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor. The AIPlayer requires only an AIView in addition to the parameters needed for a regular Player.
        /// </summary>
        /// <param name="view"></param>
        public AIPlayer(AIView view, Color c)
            : base(c, "AIPLAYER")
        {
            InitiateUtils();

            m_view = view;
            view.RegisterPlayer(this);
        }