// Update is called once per frame public void OnPointerClick() { if (!wasTriggered) { wasTriggered = true; ConversationComponent conversation = conversationComponent; if (conversation != null) { conversation.Trigger( ); } } else if (wasTriggered) { wasTriggered = false; } }
private void Update() { if (Input.GetKeyDown("space")) { if (!wasTriggered) { wasTriggered = true; ConversationComponent conversation = this.GetComponent <ConversationComponent>(); if (conversation != null) { conversation.Trigger( ); } } } else if (wasTriggered) { wasTriggered = false; } }
// Update is called once per frame void Update() { if (frames == 1000) { if (!wasTriggered) { wasTriggered = true; ConversationComponent conversation = this.GetComponent <ConversationComponent>(); if (conversation != null) { conversation.Trigger( ); } } frames = 0; } else if (wasTriggered) { wasTriggered = false; } frames++; }
// Update is called once per frame public void Update() { tPosition = Tracked.GetComponent <Transform>(); tPositionPlayer = Player.GetComponent <Transform>(); if (tPositionPlayer.position.x < Math.Abs(tPosition.position.x + 3.5) && tPositionPlayer.position.z < Math.Abs(tPosition.position.z + 3.5)) { if (!wasTriggered) { wasTriggered = true; ConversationComponent conversation = this.GetComponent <ConversationComponent>(); if (conversation != null) { conversation.Trigger( ); } } } else if (wasTriggered) { wasTriggered = false; } }
private void Update() { //MAS NACADAS PARA PROBAR if (tPosition.position.x < this.transform.position.x && tPosition.position.y > this.transform.position.y) { if (!wasTriggered) { wasTriggered = true; ConversationComponent conversation = this.GetComponent <ConversationComponent>(); if (conversation != null) { conversation.Trigger( ); } } } else if (wasTriggered) { wasTriggered = false; } }
/// <summary> /// 开始播放对话 /// </summary> /// <param name="i"></param> public void Play() { conversation.Trigger(); }