示例#1
0
        private bool sw_rampDiverted_active()
        {
            //if self.game.wizardMode.is_started():
            //    ;

            _game._sound.PlaySound("CarTires");
            cancel_delayed("clearDmd");

            var edPlayer = _game.GetCurrentPlayer();

            if (!edPlayer.ModeActive)
            {
                edPlayer.RampCount++;
                //self.game.game_data['Audits']['Wireform Diverted'] += 1
                _Text1.SetText(edPlayer.RampCount.ToString(), 2);
                _Text2.SetText("Bridge Ramps", 2);

                _Text1.set_target_position(_game.game_config.DotsW / 2, 215);
                _Text2.set_target_position(_game.game_config.DotsW / 2, 100);

                _game.LampCtrl.play_show("BridgeDivert", false);

                RampAwards(_game.Switches["rampDiverted"]);

                return(SWITCH_STOP);
            }
            else
            {
                return(SWITCH_CONTINUE);
            }
        }
示例#2
0
        private void CheckCombo()
        {
            if (_game.Switches["rampDiverted"].TimeSinceChange() < 3 ||
                _game.Switches["leftRampFull"].TimeSinceChange() < 3)
            {
                ComboText.SetText("ramp combo", 2);

                ComboText.set_target_position(_game.game_config.DotsW / 2, _game.game_config.DotsH);
            }
            else
            {
                ComboText.SetText("", 2);
                ComboText.set_target_position(_game.game_config.DotsW, _game.game_config.DotsH);
            }
        }
示例#3
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));
            }
        }
示例#4
0
        public bool sw_flipperLwL_active(NetProcgame.Game.Switch sw)
        {
            if (_userSelect)
            {
                if (_selectedIndex == 0)
                {
                    _selectedIndex = _modeList.Count - 1;
                }
                else
                {
                    _selectedIndex--;
                }

                _selectedMode = _modeList[_selectedIndex];

                _modeNameText.SetText(_selectedMode);
            }

            return(SWITCH_STOP);
        }
        private void OpenFirstLock()
        {
            cancel_delayed("stop");

            Text1.SetText("cellar open", 2);

            var group = new GroupedLayer(_game.Width, _game.Height, new List <Layer>()
            {
                CellarOpen, Text1
            });

            layer = group;

            _game.GetCurrentPlayer().CellarMultiBallReady = true;

            delay("stop", NetProcgame.NetPinproc.EventType.None, 2, ClearDmdHandler);

            _hatchOpen = true;
            _game.Coils["cellarHatch"].Enable();
        }
示例#6
0
        private Layer GenerateShedLayer(string letter)
        {
            _text1.SetText(letter, 2);
            _text2.SetText("Complete Targets", 2);

            var group1 = new GroupedLayer(_game.Width, _game.Height, new System.Collections.Generic.List <Layer>()
            {
                shedPic, _text1
            });

            var group2 = new GroupedLayer(_game.Width, _game.Height, new System.Collections.Generic.List <Layer>()
            {
                shedLock, _text2
            });

            var trans = new TransitionLayer(group1, group2);

            return(trans);
        }
        private GroupedLayer[] GetCellarLayers()
        {
            Text1.SetText("cellar ramps");
            Text2.SetText(" " + _count);
            Text3.SetText("complete to open");
            Text4.SetText("cellar locks");

            GroupedLayer[] group = new GroupedLayer[2];

            var group1 = new GroupedLayer(_game.Width, _game.Height, new List <Layer>(2)
            {
                Text1, Text2
            });

            var group2 = new GroupedLayer(_game.Width, _game.Height, new List <Layer>(2)
            {
                Text3, Text4
            });

            group[0] = group1;
            group[1] = group2;

            return(group);
        }
示例#8
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);
        }
示例#9
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);
        }
示例#10
0
        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();
            }
        }