Пример #1
0
        public WelcomePopup(Game game)
        {
            _packageContentManager = new PackageContentManager(game, game.Platform.FileSystem.AssetStorage.CreateBinaryPackage("welcome.bip", true));
            View = _packageContentManager.Load <AbstractNode>("sceneWelcomePopup4x3.object");

            _tittle        = View.FindById <BitmapTextNode>("TitleTxt");
            _centralButton = View.FindById <ButtonNode>("NewGameBtn");
            _inputNameTxt  = View.FindById <MultilineBitmapTextNode>("inputFieldTxt");
            _backButton    = View.FindById <ButtonNode>("backBtn");

            View.PostToStateMachine(new ParamEvent <string>("showPopup"));

            _backButton.Hidden            = true;
            _tittle.TextLineRenderer.Text = "Borcuha";
            _centralButton.Clicked       += OnCentralClicked;
        }
Пример #2
0
        public LobbyPopup(Game game, string userData)
        {
            _packageContentManager = new PackageContentManager(game, game.Platform.FileSystem.AssetStorage.CreateBinaryPackage("lobby.bip", true));
            View = _packageContentManager.Load <AbstractNode>("sceneLobbyPopup.object");

            _soundBtn    = View.FindById <WidgetNode>("SoundContainer");
            _nameTxt     = View.FindById <BitmapTextNode>("NameTxt");
            _scoresTxt   = View.FindById <BitmapTextNode>("ScoresTxt");
            _backBtn     = View.FindById <ButtonNode>("backBtn");
            _lvlOneBtn   = View.FindById <ButtonNode>("LevelOneBtn");
            _lvlTwoBtn   = View.FindById <ButtonNode>("LevelTwoBtn");
            _lvlThreeBtn = View.FindById <ButtonNode>("LevelThreeBtn");
            _lvlFourBtn  = View.FindById <ButtonNode>("LevelFourBtn");
            _lvlFiveBtn  = View.FindById <ButtonNode>("LevelFiveBtn");
            _lvlSixBtn   = View.FindById <ButtonNode>("LevelSixBtn");
            _lvlSevenBtn = View.FindById <ButtonNode>("LevelSevenBtn");
            _lvlEightBtn = View.FindById <ButtonNode>("LevelEightBtn");

            View.PostToStateMachine(new ParamEvent <string>("showLobbyPopup"));

            _nameTxt.TextLineRenderer.Text = userData;
            _backBtn.Clicked += backBtn_isClicked;
        }