Exemplo n.º 1
0
        public bool StopTalk()
        {
            ThirdPersonNPCNormal meThird = (ThirdPersonNPCNormal)character;

            meThird.StopTalk();
            return(true);
        }
Exemplo n.º 2
0
        void Start()
        {
            // get the components on the object we need ( should not be null due to require component so no need to check )
            agent     = GetComponentInChildren <UnityEngine.AI.NavMeshAgent>();
            character = GetComponent <ThirdPersonNPCNormal>();
            waypoints = GameObject.FindGameObjectsWithTag("waypoint");
            RandomizeWayPointIndex();

            AgentInitialization();
            FSMIntitialization();
        }
Exemplo n.º 3
0
        public bool IsTalkPartnerVisible()
        {
            bool retVal = false;

            if (vision != null)
            {
                GameObject closestCitizen = vision.GetClosestVisibleGO();
                if (closestCitizen != null)
                {
                    AICitizen            closestCitAI    = closestCitizen.GetComponent <AICitizen>();
                    ThirdPersonNPCNormal closestCitThird = closestCitizen.GetComponent <ThirdPersonNPCNormal>();
                    if (closestCitAI != null && closestCitThird != null)
                    {
                        talkPartner = closestCitizen;
                        retVal      = true;
                    }
                }
            }

            return(retVal);
        }