int Talk() { Debug.Log(".... Talking"); if (!!_currentDialogTarget) { _currentDialogTarget.ping(); isTalking = !_currentDialogTarget.isDialogOver(); if (!isTalking) { _currentDialogTarget = null; } } return(0); }
int InitDialog(GameObject colliderGO) { Debug.Log(".... Talking --- INIT "); Debug.Log("Talking to : " + colliderGO.name); TalkativeController talkativeNPC = colliderGO.GetComponent <TalkativeController>(); if (!!talkativeNPC) { talkativeNPC.ping(); isTalking = !talkativeNPC.isDialogOver(); if (!isTalking) { _currentDialogTarget = null; } else { _currentDialogTarget = talkativeNPC; } DialogRefTime = Time.time; } return(0); }