Пример #1
0
        private void InitModes()
        {
            ScoreDisplay = new ScoreDisplay(this, 1);
            ScoreDisplay.layer.enabled = false;
            BaseMode       = new BaseMode(this, 2);
            AttractMode    = new Attract(this, 20);
            SkillshotMode  = new Skillshot(this, 3);
            PagesMode      = new PageMode(this, 5);
            CellarRampMode = new CellarRamp(this, 6);
            TargetsMode    = new Targets(this, 25);
            WorkshedMode   = new WorkShed(this, 30);
            ShedMultiball  = new ShedMball(this, 35);
            BumpersMode    = new Bumpers(this, 40);
            DeadByDawnMode = new DeadByDawn(this, 50);

            SelectMode  = new ModeSelect(this, 40);
            Lindamode   = new Linda(this, 40);
            CherylMode  = new Cheryl(this, 40);
            BadHandMode = new BadHand(this, 40);
            EscapeMode  = new Escape(this, 40);
            ShellyMode  = new Shelly(this, 40);

            Modes.Add(ScoreDisplay);
            Modes.Add(BaseMode);
            Modes.Add(AttractMode);
            Modes.Add(TargetsMode);
            Modes.Add(WorkshedMode);
        }
Пример #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

            linda = new Linda();
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();
            linda      = new Linda();
            capteurH20 = new Thread(agentCapteurH20);
            capteurC0  = new Thread(agentCapteurC0);
            capteurCH4 = new Thread(agentCapteurCH4);

            pompe       = new Pompe(linda);
            pompeThread = new Thread(new ThreadStart(pompe.agentPompe));

            ventilateur       = new Ventilateur(linda);
            ventilateurThread = new Thread(new ThreadStart(ventilateur.agentVentilateur));

            H2O_seuil_haut h = new H2O_seuil_haut(linda);

            h2O_seuil_haut = new Thread(h.agent_H2O_seuil_haut);

            Detection_gaz_bas d = new Detection_gaz_bas(linda);

            detection_gaz_bas = new Thread(d.agent_detection_gaz_bas);


            CommandePompeVentilo cpv = new CommandePompeVentilo(linda);

            commandePompeVentilo = new Thread(cpv.agentCommandePompeVentilo);

            Surveillance_gaz_haut sgh = new Surveillance_gaz_haut(linda);

            surveillance_gaz_haut = new Thread(sgh.agentSurveillance_gaz_haut);

            H2O_seuil_bas hb = new H2O_seuil_bas(linda);

            h2O_seuil_bas = new Thread(hb.agent_H2O_seuil_bas);


            try{
                H2OSeuilBasTextBox.Text  = linda.lindaReadP("value_Seuil_H2O_Bas").Arguments.Split(',')[1];
                COSeuilBasTextBox.Text   = linda.lindaReadP("value_Seuil_CO_Bas").Arguments.Split(',')[1];
                CH4SeuilBasTextBox.Text  = linda.lindaReadP("value_Seuil_CH4_Bas").Arguments.Split(',')[1];
                H2OSeuilHautTextBox.Text = linda.lindaReadP("value_Seuil_H2O_Haut").Arguments.Split(',')[1];
                COSeuilHautTextBox.Text  = linda.lindaReadP("value_Seuil_CO_Haut").Arguments.Split(',')[1];
                CH4SeuilHautTextBox.Text = linda.lindaReadP("value_Seuil_CH4_Haut").Arguments.Split(',')[1];
                H2OValueTextBox.Text     = linda.lindaReadP("niveau_H2O").Arguments.Split(',')[1];
                COValueTextBox.Text      = linda.lindaReadP("niveau_CO").Arguments.Split(',')[1];
                CH4ValueTextBox.Text     = linda.lindaReadP("niveau_CH4").Arguments.Split(',')[1];
            }
            catch (Exception e) {
                Console.WriteLine(e);
            }


            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_Closing);
        }
Пример #4
0
            public static void CreateMobiles(Point3D pointLocation, Map mapLocation)
            {
                Point3D theDrunk  = new Point3D(3736, 2220, 20);
                Point3D vincent   = new Point3D(1545, 1768, 10);
                Point3D linda     = new Point3D(2710, 2106, 0);
                Point3D boyfriend = new Point3D(2712, 2104, 0);

                if (!FindMobile(mapLocation, pointLocation))
                {
                    TheDrunk        td = new TheDrunk();
                    Vincent         v  = new Vincent();
                    Linda           l  = new Linda();
                    LindasBoyfriend bf = new LindasBoyfriend();

                    if (pointLocation == theDrunk)
                    {
                        td.Direction = Direction.East;
                        td.Location  = pointLocation;
                        td.Map       = mapLocation;
                        World.AddMobile(td);
                    }

                    if (pointLocation == vincent)
                    {
                        v.Direction = Direction.North;
                        v.Location  = pointLocation;
                        v.Map       = mapLocation;
                        World.AddMobile(v);
                    }

                    if (pointLocation == boyfriend)
                    {
                        bf.Direction = Direction.South;
                        bf.Location  = pointLocation;
                        bf.Map       = mapLocation;
                        World.AddMobile(bf);
                    }

                    if (pointLocation == linda)
                    {
                        l.Direction = Direction.East;
                        l.Location  = pointLocation;
                        l.Map       = mapLocation;
                        World.AddMobile(l);
                    }

                    l.BoyFriend = bf;
                }
            }