예제 #1
0
        private void Settings_Load(object sender, EventArgs e)
        {
            gv = GlobalVarialbles.Constructor();

            initTextBoxes(gbServСontrol1, gv.serverCmds);
            initTextBoxes(gbServСontrol2, gv.serverCmds);
            initTextBoxes(gbGameСontrol1, gv.botKeys);

            checkBoxKill.Checked  = gv.botKeys["kill"] == Keys.D1;
            checkBoxSpeed.Checked = gv.botKeys["speed"] == Keys.D1;

            udTimes.Value  = Convert.ToInt32(gv.learning["times"]);
            labelPath.Text = gv.learning["path"];
            template.Text  = gv.learning["template"];
        }
예제 #2
0
        private void initServCmds()
        {
            spc = new SimplePlaneControler();
            GlobalVarialbles gv = GlobalVarialbles.Constructor();

            com_up      = gv.serverCmds["up"];
            com_down    = gv.serverCmds["down"];
            com_right   = gv.serverCmds["right"];
            com_left    = gv.serverCmds["left"];
            com_esLeft  = gv.serverCmds["esLeft"];
            com_esRight = gv.serverCmds["esRight"];
            com_fire    = gv.serverCmds["fire"];
            com_run     = gv.serverCmds["run"];
            com_pause   = gv.serverCmds["pause"];
            com_lMove   = gv.serverCmds["lmove"];
            com_rMove   = gv.serverCmds["rmove"];
        }
예제 #3
0
        public BotLearning(BotCV bc)
        {
            pressedKeys  = new List <Keys>(4);
            gkl.KeyDown += Gkl_KeyDown;
            gkl.KeyUp   += Gkl_KeyUp;

            GlobalVarialbles gv = GlobalVarialbles.Constructor();

            maxAllowFps = Convert.ToInt32(gv.learning["times"]);
            template    = gv.learning["template"];
            filePath    = gv.learning["path"];
            com_fire    = (byte)gv.botKeys["fire"];

            com_down       = (byte)gv.botKeys["down"];
            com_up         = (byte)gv.botKeys["up"];
            com_left       = (byte)gv.botKeys["left"];
            com_right      = (byte)gv.botKeys["right"];
            com_esRight    = (byte)gv.botKeys["esRight"];
            com_esLeft     = (byte)gv.botKeys["esLeft"];
            com_flaps_next = (byte)gv.botKeys["flaps-next"];
            com_flaps_prev = (byte)gv.botKeys["flaps-prev"];

            this.bc = bc;
        }