public E_CHAR_SELECT_STEP Update() { if (this.m_CurrentAni != null) { this.PlayAni(); } if (this.m_PlayAniQue.Count > 0 && this.m_CurrentAni == null) { this.m_CurrentAni = this.m_PlayAniQue.Dequeue(); } if (NkInputManager.GetKeyUp(KeyCode.Escape)) { this.SkipEvent(); } if (this.m_PlayAniQue.Count == 0 && this.m_bSendEvent) { this.m_bSendEvent = false; if (this.m_PlayAniEndEvent != null) { this.m_PlayAniEndEvent(null); this.m_PlayAniEndEvent = null; } return(this.m_NextStep); } return(E_CHAR_SELECT_STEP.NONE); }
public void Add(E_CHAR_SELECT_STEP NextStep, Action <object> a_EndEvent, float _fEventFixTime, params object[] _states) { for (int i = 0; i < _states.Length; i++) { object obj = _states[i]; try { E_CAMARA_STATE_ANI e_CAMARA_STATE_ANI = (E_CAMARA_STATE_ANI)((int)obj); AniKeyPair data = this.m_aniKeyManager.GetData(e_CAMARA_STATE_ANI); if (data != null) { this.m_PlayAniQue.Enqueue(data); } else { TsLog.LogWarning("STATE ITEM == NULL : {0}", new object[] { e_CAMARA_STATE_ANI }); } } catch (Exception ex) { TsLog.LogError("Error State : {0} , Message : {1}", new object[] { obj.ToString(), ex.Message }); } } this.m_fFixTime = _fEventFixTime; this.m_bSendEvent = false; this.m_NextStep = NextStep; this.m_PlayAniEndEvent = a_EndEvent; }
public void AddData(E_CAMARA_STATE_ANI _camerastate, string CameraAni, string ActionAni) { if (!this.m_Keys.ContainsKey(_camerastate)) { AniKeyPair value = new AniKeyPair(_camerastate, CameraAni, ActionAni); this.m_Keys.Add(_camerastate, value); } }
public void PlayAni() { if (this.m_Camera != null) { if (!this.m_Camera.animation.isPlaying) { AnimationClip clip = this.m_Camera.animation.GetClip(this.m_CurrentAni.CameraAniKey); if (clip != null) { this.m_CurrentAni.PlayTime = Time.time + clip.length; this.m_Camera.animation.Play(this.m_CurrentAni.CameraAniKey); } else { this.m_CurrentAni.PlayTime = 0f; } if (this.m_ActionAnis.ContainsKey(this.m_CurrentAni.ActionAniKey)) { this.m_ActionAnis[this.m_CurrentAni.ActionAniKey].Play(this.m_CurrentAni.ActionAniKey); if (clip == null) { this.m_CurrentAni = null; } } this.m_bSendEvent = false; this.m_bSendCheck = false; TsLog.Log("PLAYANI CKey : {0}, AKey:{1} CSTATE : {2} LENGTH : {3}", new object[] { this.m_CurrentAni.CameraAniKey, this.m_CurrentAni.ActionAniKey, this.m_CurrentAni.CameraStste, clip.length }); } else { if (!this.m_bSendCheck && !this.m_bSendEvent && this.m_CurrentAni != null && Time.time > this.m_CurrentAni.PlayTime - this.m_fFixTime) { this.m_bSendEvent = true; this.m_bSendCheck = true; } if (this.m_CurrentAni != null && Time.time > this.m_CurrentAni.PlayTime) { this.m_CurrentAni = null; this.m_bSendCheck = false; } } } else { TsLog.Log("m_Camera == null", new object[0]); } }
public void SkipEvent() { if (this.m_PlayAniQue.Count != 0) { this.m_Camera.animation.Stop(); if (this.m_ActionAnis.ContainsKey(this.m_CurrentAni.ActionAniKey)) { this.m_ActionAnis[this.m_CurrentAni.ActionAniKey].Stop(); this.m_IntroVoice.Stop(); } for (int i = this.m_PlayAniQue.Count; i > 1; i--) { this.m_CurrentAni = this.m_PlayAniQue.Dequeue(); } this.m_CurrentAni = null; } }