コード例 #1
0
//	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
    }
コード例 #2
0
    /// <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();
            }
        }
    }