public void OnCharacterBoundToGame()
 {
     Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
     {
         GameManager.GetInstance().SetTargetGameState("GameWorldScreen");
     });
 }
    public override void Start()
    {
        base.Start();

        m_gameWorldModel                  = new GameWorldModel(this);
        m_gameWorldDebug                  = new GameWorldDebug(this);
        m_contextOverlayController        = new ContextOverlayController(this);
        gameWorldView.GameWorldController = this;
        m_chatWindowController            = null;

        gameWorldView.Start();
        m_contextOverlayController.Start(gameWorldView.RootWidgetGroup);
        m_gameWorldModel.Start();
        m_gameWorldDebug.Start();

        // Ask the server for the complete state of the game
        m_gameWorldModel.RequestFullGameState();

        // $TODO Play title music

        // Fade in the background
        m_readyForInput = false;
        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeIn, 1.0f, () =>
        {
            m_readyForInput = true;
        });
    }
Пример #3
0
 private void ExitMenu()
 {
     audio.PlayOneShot(successSound, 1.0f);
     Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
     {
         GameManager.GetInstance().SetTargetGameState("SelectCharacterScreen");
     });
 }
    public void OnCancelClicked()
    {
        audio.PlayOneShot(successSound, 1.0f);

        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
        {
            GameManager.GetInstance().SetTargetGameState("LoginScreen");
        });
    }
    public void OnCreateAccountSucceeded(string result)
    {
        Status = result;

        audio.PlayOneShot(successSound, 1.0f);

        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
        {
            GameManager.GetInstance().SetTargetGameState("LoginScreen");
        });
    }
Пример #6
0
    public void OnLoginSucceeded()
    {
        loginView.SetLoginStatus("Success!");
        audio.PlayOneShot(successSound, 1.0f);

        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
        {
            GameManager.GetInstance().SetTargetGameState("SelectGameScreen");
        });

        Debug.Log("Login Succeeded!");
    }
 public void OnGameSelectClicked()
 {
     if (m_selectGameModel.GetGameCount() > 0)
     {
         Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
         {
             GameManager.GetInstance().SetTargetGameState("SelectCharacterScreen");
         });
     }
     else
     {
         audio.PlayOneShot(errorSound, 1.0f);
     }
 }
    // Use this for initialization
    public override void Start()
    {
        base.Start();

        m_createAccountModel = new CreateAccountModel(this);

        createAccountView.createAccountController = this;

        // Fade in the background
        m_readyForInput = false;
        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeIn, 1.0f, () =>
        {
            m_readyForInput = true;
        });
    }
Пример #9
0
    // Use this for initialization
    public override void Start()
    {
        base.Start();

        m_createCharacterModel = new CreateCharacterModel(this);

        createCharacterView.CreateCharacterController = this;
        createCharacterView.Start();
        createCharacterView.SetPortraitId(m_createCharacterModel.GetPictureId());

        // Fade in the background
        m_readyForInput = false;
        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeIn, 1.0f, () =>
        {
            m_readyForInput = true;
        });
    }
Пример #10
0
    // Use this for initialization
    public override void Start()
    {
        base.Start();

        m_loginModel = new LoginModel(this);

        loginView.loginController = this;
        loginView.Start();

        // $TODO Play title music

        // Fade in the background
        m_readyForInput = false;
        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeIn, 1.0f, () =>
        {
            m_readyForInput = true;
        });
    }
    // Use this for initialization
    public override void Start()
    {
        base.Start();

        m_selectGameModel = new SelectGameModel(this);

        selectGameView.SelectGameController = this;
        selectGameView.Start();

        // $TODO Play title music

        // Fade in the background
        m_readyForInput = false;
        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeIn, 1.0f, () =>
        {
            m_readyForInput = true;
        });

        // Request a list of games available on the server
        m_gameListRefreshRequested = true;
    }