private void OnTriggerExit(Collider other) { if (other.GetComponent <CommentSentenceCollider>()) { CommentSentence sentence = other.GetComponent <CommentSentenceCollider>().m_sentence; sentence.SetFeedbackState(GlobalDefine.CensorAreaTypes.None); } }
private void OnTriggerEnter(Collider other) { if (other.GetComponent <CommentSentenceCollider>()) { Debug.Log("CommentSentenceCollider: " + other); CommentSentence sentence = other.GetComponent <CommentSentenceCollider>().m_sentence; sentence.SetFeedbackState(m_areaType); //if(sentence) } }
public void SpawnSentence(Comment word, int offset) { m_CommentRoot.transform.SetParent(m_CommentRoot); CommentSentence commentSentence = GameObject.Instantiate(SentencePrefab) as CommentSentence; commentSentence.transform.SetParent(m_CommentRoot); commentSentence.SetComment(word); commentSentence.transform.position = LauncherPoints[0].transform.position + Vector3.down * offset; commentSentence.m_Canvas.worldCamera = sceneCamera; commentSentence.Launch(); }