Exemple #1
0
    /// <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();
    }
Exemple #2
0
    /// <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 );
    }