Example #1
0
        public WorkSeat(GameObject workseat, DAS.NPC npc)
        {
            this.workSeatGameObject = workseat;
            this.NpcOwner           = npc;
            WorkSeatManager.myInstance.workSeats.Add(this);

            workSeatGameObject.name = "Work seat for " + NpcOwner.name;
        }
Example #2
0
        /// <summary>
        /// Initializes variables calling upon GetComponent
        /// <para>Returns false if GetComponent fails on any variable.</para>
        /// </summary>
        /// <returns></returns>
        private bool SetAllGetComponents()
        {
            if (!(m_agentRef = GetComponent <NavMeshAgent>()))
            {
                return(false);
            }

            if (!(m_myNpcRef = gameObject.GetComponent <NPC>()))
            {
                return(false);
            }

            if (!(m_currentAnimator = GetComponentInChildren <Animator>()))
            {
                return(false);
            }

            return(true);
        }