コード例 #1
0
 public void OnCharacterBoundToGame()
 {
     Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
     {
         GameManager.GetInstance().SetTargetGameState("GameWorldScreen");
     });
 }
コード例 #2
0
    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");
     });
 }
コード例 #4
0
    public void OnCancelClicked()
    {
        audio.PlayOneShot(successSound, 1.0f);

        Fader.AttachFaderTo(this.gameObject, Color.black, Fader.eFadeType.fadeOut, 1.0f, () =>
        {
            GameManager.GetInstance().SetTargetGameState("LoginScreen");
        });
    }
コード例 #5
0
    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!");
    }
コード例 #7
0
 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);
     }
 }
コード例 #8
0
    // 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;
        });
    }
コード例 #11
0
    // 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;
    }