/// <summary> /// OnEnable and Find TextBox Object. /// </summary> void OnEnable( ) { // Now , At ScenarioNode OnEnable #if false ViNoSoundPlayer pl = ISoundPlayer.Instance as ViNoSoundPlayer; pl.SetSoundData(soundData); #endif FindTextBoxObjects(); }
// static private Vector2 m_ScrollPos = Vector2.zero; void OnEnable( ) { // Debug.Log( "OnEnable DialogPartNode"); DialogPartNode dlgNode = (target as DialogPartNode); serializedObject.FindProperty("__dummy__"); // soundDataProp = serializedObject.FindProperty ("soundData"); // DialogPartNodeUtility.RestoreSceneData( dlgNode ); dlgNode.FindTextBoxObjects(); // Assign DialogID. dlgNode.ReAssignDialogIDsInThisObject(); if (m_SoundPlInstance == null) { m_SoundPlInstance = GameObject.FindObjectOfType(typeof(ViNoSoundPlayer)) as ViNoSoundPlayer; } if (m_SoundPlInstance != null) { m_BgmEntries = m_SoundPlInstance.GetSoundEntryNames(); m_VoiceEntries = m_SoundPlInstance.GetVoiceEntryNames(); m_SeEntries = m_SoundPlInstance.GetSeEntryNames(); #if false ScriptableSoundData sound = soundDataProp.objectReferenceValue as ScriptableSoundData; if (sound != null) { /* m_SoundPlInstance.soundEntry = sound.bgmEntries; * m_SoundPlInstance.seEntries = sound.seEntries; * m_SoundPlInstance.voiceEntries = sound.voiceEntries; * * //*/ } #endif } #if false if (m_AnimManagerInstance == null) { m_AnimManagerInstance = GameObject.FindObjectOfType(typeof(ViNoAnimationManager)) as ViNoAnimationManager; } if (m_AnimManagerInstance != null) { m_AnimManagerInstance.CollectAnimationNames(); m_AnimationEntries = m_AnimManagerInstance.animNames; } #endif }
/// <summary> /// OnEnable and Get the Music Names. /// </summary> void OnEnable( ) { if (m_SoundPlInstance == null) { m_SoundPlInstance = GameObject.FindObjectOfType(typeof(ISoundPlayer)) as ISoundPlayer; } if (m_SoundPlInstance != null) { if (m_SoundPlInstance as ViNoSoundPlayer) { ViNoSoundPlayer pl = m_SoundPlInstance as ViNoSoundPlayer; m_SoundEntries = pl.GetSoundEntryNames(); m_VoiceEntries = pl.GetVoiceEntryNames(); m_SeEntries = pl.GetSeEntryNames(); } } }
/// <summary> /// Checks the instance. /// if Played , the Played Scenario is the instance. /// if Awaken , the Awaken Scenairo is the instance. /// </summary> private void CheckInstance() { // DialogPartNode OnEnable is off. // SOUND DATA IS NOT USED CURRENTLY. #if false if (soundData != null) { ViNoSoundPlayer pl = ISoundPlayer.Instance as ViNoSoundPlayer; pl.SetSoundData(soundData); } #endif // Debug.Log( "ScenarioNode Check Instance."); /* if( saveInfo == null ){ * Debug.LogWarning( "SaveInfo not Attached to " + name + "ScenarioNode. The GameState of this ScenarioNode is NOT Saved." ) ; * } * //*/ if (flagTable == null) { Debug.LogWarning("FlagTable not Attached to " + name + "ScenarioNode. Flag Information is NOT to be Saved."); } if (ScenarioCtrl.Instance != null && ScenarioCtrl.Instance.destroyPrevScenario) { if (instance != null && instance.gameObject != this.gameObject) { // instance.gameObject.SetActive( false) ; Destroy(instance.gameObject); } } // Debug.Log( "ScenarioNode Instance is now :" + this.name ); instance = this; // Play a Scenario and Active. Currently false. // instance.gameObject.SetActive( true ); }
// static private Vector2 m_ScrollPos = Vector2.zero; void OnEnable( ) { // Debug.Log( "OnEnable DialogPartNode"); DialogPartNode dlgNode = ( target as DialogPartNode ); serializedObject.FindProperty ("__dummy__"); // soundDataProp = serializedObject.FindProperty ("soundData"); // DialogPartNodeUtility.RestoreSceneData( dlgNode ); dlgNode.FindTextBoxObjects(); // Assign DialogID. dlgNode.ReAssignDialogIDsInThisObject(); if( m_SoundPlInstance == null ){ m_SoundPlInstance = GameObject.FindObjectOfType( typeof( ViNoSoundPlayer ) ) as ViNoSoundPlayer; } if( m_SoundPlInstance != null ){ m_BgmEntries = m_SoundPlInstance.GetSoundEntryNames(); m_VoiceEntries = m_SoundPlInstance.GetVoiceEntryNames(); m_SeEntries = m_SoundPlInstance.GetSeEntryNames(); #if false ScriptableSoundData sound = soundDataProp.objectReferenceValue as ScriptableSoundData; if( sound != null ){ /* m_SoundPlInstance.soundEntry = sound.bgmEntries; m_SoundPlInstance.seEntries = sound.seEntries; m_SoundPlInstance.voiceEntries = sound.voiceEntries; //*/ } #endif } #if false if( m_AnimManagerInstance == null ){ m_AnimManagerInstance = GameObject.FindObjectOfType( typeof( ViNoAnimationManager ) ) as ViNoAnimationManager; } if( m_AnimManagerInstance != null ){ m_AnimManagerInstance.CollectAnimationNames(); m_AnimationEntries = m_AnimManagerInstance.animNames; } #endif }