void OnTriggerEnter(Collider other) { if (!sequenceToPlay) { Debug.LogWarning("You have triggered a sequence in your scene, however, you didn't assign it a Sequence To Play", gameObject); return; } if (sequenceToPlay.IsPlaying) { return; } if (other.CompareTag("MainCamera") && isMainCameraTrigger) { sequenceToPlay.Play(); return; } if (other.CompareTag("Player") && isPlayerTrigger) { sequenceToPlay.Play(); return; } if (other.gameObject == triggerObject) { sequenceToPlay.Play(); return; } }
public void Play() { if (m_SequencerGameObject != null) { WellFired.USSequencer sequencer = m_SequencerGameObject.GetComponent <WellFired.USSequencer>(); sequencer.Play(); } }
private void PlaySequence() { if (sequenceToPlay.RunningTime >= sequenceToPlay.Duration) { sequenceToPlay.RunningTime = 0.0f; } sequenceToPlay.Play(); }
private void ToggleSequence() { if (sequenceToPlay.RunningTime >= sequenceToPlay.Duration) { sequenceToPlay.RunningTime = 0.0f; sequenceToPlay.Play(); } else { if (sequenceToPlay.IsPlaying) { sequenceToPlay.Pause(); } else { sequenceToPlay.Play(); } } }
public override void FireEvent() { if (!sequence) { Debug.LogWarning("No sequence for USPlaySequenceEvent : " + name, this); return; } if (!Application.isPlaying) { Debug.LogWarning("Sequence playback controls are not supported in the editor, but will work in game, just fine."); return; } if (!restartSequencer) { sequence.Play(); } else { sequence.RunningTime = 0.0f; sequence.Play(); } }
void Update() { if (hasPlayed) { return; } currentTime += Time.deltaTime; if (currentTime >= delay && sequence) { sequence.Play(); hasPlayed = true; } }
public void PlaySequencer(string strSequencer) { if (m_IsPlay) { return; } if (strSequencer == "") { return; } //隐藏npc //Client.IEntitySystem es = Client.ClientGlobal.Instance().GetEntitySystem(); //if (es != null) // es.ShowEntity(false); try { m_SequencerGameObject = WellFired.USSequencerLoad.LoadSequencerFromXml(strSequencer); } catch { PlaybackFinished(null); goto Exit0; } if (m_SequencerGameObject != null) { WellFired.USSequencer sequencer = m_SequencerGameObject.GetComponent <WellFired.USSequencer>(); if (sequencer != null) { sequencer.PlaybackFinished += this.PlaybackFinished; sequencer.BeforeUpdate += this.BeforeUpdate; m_IsPlay = true; if (m_IsPlay == true) { RoleStateBarManager.HideHeadStatus();//隐藏npc血条 //隐藏提示 TipsManager.Instance.EnableTips(false); //关闭声音 //IClientGlobal的MuteGameSound方法 Client.ClientGlobal.Instance().MuteGameSound(true); ///显示黑边 StoryPanel.StoryData data = new StoryPanel.StoryData(); data.Des = ""; data.ShowSkip = SequencerManager.Instance().IsShowSkipSequencerBtn(); data.SkipDlg = SequencerManager.Instance().OnSkipSequencer; data.ColliderClickDlg = SequencerManager.Instance().OnClickSequencer; ////隐藏npc Client.IEntitySystem es = Client.ClientGlobal.Instance().GetEntitySystem(); if (es != null) { es.ShowEntity(false); } } sequencer.Play(); } } Exit0: return; }