Esempio n. 1
0
        private void InitDisplayLayers()
        {
            zoomSaw      = AssetService.Videos["zoom_saw"];
            zoomSaw.hold = true;
            loadGun      = AssetService.Videos["load_gun"];
            loadGun.hold = true;
            gunNSaw      = AssetService.Videos["gunNsaw"];
            gunNSaw.hold = true;

            shedPic  = AssetService.Animations["light_texture"];
            shedLock = AssetService.Animations["shedLock"];

            _text1 = new SdlTextLayer(_game.Width / 2, 10, "ed_targets", FontJustify.Center, FontJustify.Top);
            _text2 = new SdlTextLayer(0, _game.Height / 2, "ed_targets", FontJustify.Center, FontJustify.Bottom);
        }
        public CellarRamp(Game game, int priority) : base(game, priority)
        {
            Text1 = new SdlTextLayer(15, 250, "pinregsmall", FontJustify.Left, FontJustify.Center);
            Text2 = new SdlTextLayer(500, 250, "pinregsmall", FontJustify.Left, FontJustify.Center);
            Text3 = new SdlTextLayer(15, 200, "pinregsmall", FontJustify.Left, FontJustify.Center);
            Text4 = new SdlTextLayer(15, 250, "pinregsmall", FontJustify.Left, FontJustify.Center);

            CellarRampVid = AssetService.Videos["CellarRamp"];
            CellarOpen    = AssetService.Videos["CellarOpen"];

            ClearDmdHandler  = new AnonDelayedHandler(this.ClearDmd);
            KickSuperJackpot = new AnonDelayedHandler(this.KickSuperJack);
            CheckCellarDelay = new AnonDelayedHandler(this.CheckCellarDone);

            _game = game;
        }
Esempio n. 3
0
        public override void mode_started()
        {
            _lanesEnabledCount = 0;
            _bonusX            = 0;

            var anim = AssetService.Animations["light_texture"];
            //anim.hold = true;

            var text = new SdlTextLayer(0, 0, fontNamed: "default", justify: FontJustify.Center);

            var layers = new List <Layer>();

            layers.Add(anim);
            layers.Add(text);

            var group = new GroupedLayer(558, 300, layers);

            this.layer = anim;
        }
Esempio n. 4
0
        private void ModePicker()
        {
            _selectedMode = RandomModeName();

            _modeNameText = new SdlTextLayer(_game.Width / 2, 150, "ed_LeftRamp1", FontJustify.Center, FontJustify.Center,
                                             "redYelThin");
            _selectInfoText = new SdlTextLayer(_game.Width, _game.Height, "default_msg", FontJustify.Right, FontJustify.Bottom,
                                               "yelRedThin");

            _modeNameText.SetText(_selectedMode);

            if (_userSelect)
            {
                _selectInfoText.SetText(_game.GetCurrentPlayer().name + " Select mode with flippers", blink_frames: 2);
                _selectedIndex = 0;
            }
            else
            {
                _selectInfoText.SetText(" ");
            }

            var layers = new List <Layer>()
            {
                _tapeRecorder, _modeNameText, _selectInfoText
            };
            var group = new GroupedLayer(_game.Width, _game.Height, layers);

            _game._sound.PlaySound("Passage");

            layer = group;

            delay("modeStart",
                  NetProcgame.NetPinproc.EventType.None, 2.5,
                  new NetProcgame.Game.AnonDelayedHandler(StartSelectedMode));

            if (!_userSelect)
            {
                delay("choice",
                      NetProcgame.NetPinproc.EventType.None, 0.25,
                      new NetProcgame.Game.AnonDelayedHandler(StartSelectedMode));
            }
        }
Esempio n. 5
0
        private void PopulateTextLayers(ref Game game)
        {
            _Text1 = new SdlTextLayer(
                _game.game_config.DotsW / 2,
                15, "ed_LeftRamp1",
                FontJustify.Center, FontJustify.Bottom,
                "redYellow");

            _Text2 = new SdlTextLayer(
                _game.game_config.DotsW / 2,
                15, "ed_LeftRamp1",
                FontJustify.Center, FontJustify.Bottom,
                "redYellow");

            ComboText = new SdlTextLayer(
                _game.game_config.DotsW / 2,
                _game.game_config.DotsH, "ed_LeftRamp1",
                FontJustify.Center, FontJustify.Bottom,
                "redYellow");

            resetText();
        }
Esempio n. 6
0
        public GroupedLayer SetStatus(string text1, string text2,
                                      int seconds     = 2,
                                      string font     = "default",
                                      string style1   = "redYelThin", string style2 = "yelRedThin",
                                      int topTextX    = 558 / 2, int topTextY       = 90,
                                      int bottomTextX = 558 / 2, int bottomTextY    = 220, bool composite = true
                                      )
        {
            var topText1 = new SdlTextLayer(topTextX, topTextY, font, FontJustify.Center, FontJustify.Center, style1);
            var topText2 = new SdlTextLayer(topTextX, topTextY, font, FontJustify.Center, FontJustify.Center, style2);
            var botText1 = new SdlTextLayer(bottomTextX, bottomTextX, font, FontJustify.Center, FontJustify.Center, style1);
            var botText2 = new SdlTextLayer(bottomTextX, bottomTextX, font, FontJustify.Center, FontJustify.Center, style2);

            topText1.SetText(text1, seconds);
            topText2.SetText(text1, seconds, 2);
            botText1.SetText(text2, seconds);
            botText2.SetText(text2, seconds, 2);

            var layers = new List <Layer>()
            {
                topText1, topText2, botText1, botText2
            };

            GroupedLayer group;

            if (!composite)
            {
                group = new GroupedLayer(_game.Width, _game.Height, layers);
            }
            else
            {
                group = new GroupedLayer(_game.Width, _game.Height, layers, true);
            }

            return(group);
        }
Esempio n. 7
0
        private ScriptedLayer BuilSkillLayers()
        {
            var anim = AssetService.Animations["DeerWall"];

            var skillBonusText10K = new SdlTextLayer(150, 210, "ed_common", FontJustify.Center, false);

            skillBonusText10K.SetText("10,000", -1, 2);

            var skillBonusText1M = _game.DisplayHelper.GenerateMultiTextLayer("1,000,000", font: "ed_common", styleName: "redYellow");
            var skillBonus100K   = _game.DisplayHelper.GenerateMultiTextLayer("100,000", font: "ed_common", styleName: "redYellow");

            var skillBonusLeft10k = new GroupedLayer(HorseGame.DisplayConfig.DotsW, HorseGame.DisplayConfig.DotsH, new List <Layer>()
            {
                anim, skillBonusText10K
            });

            var skillBonusMid1M = new GroupedLayer(HorseGame.DisplayConfig.DotsW, HorseGame.DisplayConfig.DotsH, new List <Layer>()
            {
                anim, skillBonusText1M
            });

            var skillBonus100KR = new GroupedLayer(HorseGame.DisplayConfig.DotsW, HorseGame.DisplayConfig.DotsH, new List <Layer>()
            {
                anim, skillBonus100K
            });

            var script = new List <Pair <double, Layer> >();

            script.Add(new Pair <double, Layer>(1, skillBonusLeft10k));
            script.Add(new Pair <double, Layer>(1, skillBonusMid1M));
            script.Add(new Pair <double, Layer>(1, skillBonus100KR));

            var scriptLayer = new ScriptedLayer(HorseGame.DisplayConfig.DotsW, HorseGame.DisplayConfig.DotsH, script);

            return(scriptLayer);
        }
        private void PlayMultiBallScenes()
        {
            _videosRunning = true;

            var skipInfo = new SdlTextLayer(_game.Width, _game.Height, "med",
                                            FontJustify.Left, FontJustify.Bottom, "redYellow");

            skipInfo.SetText("hold flipper to skip", blink_frames: 2);

            _game.DisableAllLamps();

            _game.LampCtrl.stop_show();

            VideoLayer    anim = new VideoLayer();
            ScriptedLayer textLockScript;

            if (_lockedBalls != 0)
            {
                _game.LampCtrl.play_show("cellarLock1");
                _game.CellarHatch(false);

                var strtext = string.Format("Cellar Multiball | Ball {0} Locked", _lockedBalls);
                textLockScript = _game.DisplayHelper.GenerateScriptedMultiTextLayer(
                    strtext, _game.Width, _game.Height, 2.0, "ed_targets", "redYellow");
                textLockScript.set_target_position(36, 100);

                var time = 0.0;
                switch (_lockedBalls)
                {
                case 1:
                    anim = AssetService.Videos["Cellar1-SonOfABitch"];
                    _game._sound.PlaySound("Cellar1-SonOfABitch");
                    time = 7.5;
                    break;

                case 2:
                    anim = AssetService.Videos["Cellar2-LetMeOut"];
                    _game._sound.PlaySound("Cellar2-LetMeOut");
                    time = 3.5;
                    break;

                case 3:
                    anim = AssetService.Videos["Cellar3-Henrietta"];
                    _game.LampCtrl.play_show("CellarMultiball");
                    _game._sound.PlaySound("Cellar3-Henrietta");
                    time = 9.0;
                    break;

                default:
                    break;
                }

                delay("cellarAnims", NetProcgame.NetPinproc.EventType.None, time, CheckCellarDelay);

                var grouped = new GroupedLayer(_game.Width, _game.Height, new List <Layer>()
                {
                    anim, textLockScript
                });
                layer = grouped;
                anim.reset();
            }
        }