public bool StopTalk() { ThirdPersonNPCNormal meThird = (ThirdPersonNPCNormal)character; meThird.StopTalk(); return(true); }
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(); }
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); }