FadeToBlack() public method

public FadeToBlack ( ) : void
return void
Esempio n. 1
0
 // Start the action
 public override void Start()
 {
     if (this.fadeToBlack)
     {
         fade.FadeToBlack();
     }
     else
     {
         fade.FadeToClear();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Starts the battle from an intermission
 /// </summary>
 public void StartBattle()
 {
     nextLevel = LevelDB.Instance.GetNextLevel(nextLevel);
     if (nextLevel == "-1")
     {
         nextLevel = LevelDB.Instance.GetMainMenu();
     }
     StateManager.Instance.DebugPush(GameState.LevelManagerAnimation);
     aniDuration = 0f;
     SceneFadeInOut.FadeToBlack();
     //GotoNextLevel();
 }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     if (_enabled)
     {
         if (StateManager.Instance.State == GameState.noState && _nextDialogue < dialogues.Count)
         {
             // count upwards
             _nextDialogue++;
             // start dialogue
             if (_nextDialogue < dialogues.Count)
             {
                 string title = dialogues[_nextDialogue];
                 if (title == "NextSlide")
                 {
                     PowerPointSlide.instance.Advance();
                 }
                 else if (title == "FadeToBlack")
                 {
                     SceneFadeInOut.FadeToBlack();
                 }
                 else if (title == "FadeToClear")
                 {
                     SceneFadeInOut.FadeToClear();
                 }
                 else
                 {
                     Dialogue.StartDialogue(dialogues[_nextDialogue], null);
                 }
             }
         }
         else if (_nextDialogue == dialogues.Count)
         {
             if (skipSetup)
             {
                 LevelManager.Instance.StartBattle();
                 _enabled = false;
             }
             else
             {
                 gameObject.AddComponent <IntermissionMenu>();
                 _enabled = false;
             }
         }
     }
 }
Esempio n. 4
0
    void OnGUI()
    {
        if (StateManager.Instance.State == GameState.LevelManagerAnimation)
        {
            if (aniDuration < 0)
            {
                if (fadeToBlack)
                {
                    SceneFadeInOut.FadeToBlack();
                    fadeToBlack = false;
                }
                else
                {
                    StateManager.Instance.DebugPop();
                    GotoNextLevel();
                }
            }

            GUI.Box(new Rect(Screen.width / 2 - 50, Screen.height / 2 - 12, 100, 25), msg);
        }
    }