Beispiel #1
0
        ////public void Main(String[] args)
        ////{
        ////    FlightSimulator applet = new FlightSimulator();
        ////    // Frame frame = new Frame("Applet");

        ////    // frame.AddWindowListener(applet);
        ////    // frame.Add("Center", applet);
        ////    //  frame.SetSize((int)sX1, (int)sY1);
        ////    //  frame.Show();

        ////    applet.Init();
        ////    //applet.Start();
        ////}

        public void Init()
        {
            //base.Init();
            //AddKeyListener(this);
            //AddMouseListener(this);
            //AddMouseMotionListener(this);

            // codeBase = GetCodeBase();
            gd = new GraphicsGenerator(codeBase, sX0, sY0, sX1, sY1);

            //doubleBuffer = CreateImage((int)gd.proj.screenXSize, (int)gd.proj.screenYSize);
            //myGC = doubleBuffer.GetGraphics();
            //LocusImage = CreateImage((int)gd.proj.screenXSize, (int)gd.proj.screenYSize);
            //locusGC = LocusImage.GetGraphics();

            Jp.Maker1.Util.Gui.Caption.Initial(270, 180, GraphicsGenerator.CAPTION_COLOR, GraphicsGenerator.CAPTION_FONT);

            apl = new AirPlaneList(codeBase, "data/airplane_list.txt");
            apl.Print();

            ap = new AirPlane(codeBase, apl.GetPath(0));

            ap.Set_pMotionLand();

            configMenu = new ConfigMenu(sX0, sY0, sX1, sY1, apl);

            InitPadlockList();

            tp.SetTSTART();
        }
Beispiel #2
0
        public void MouseClicked(int mx, int my, AirPlane ap, SimulatorInterface simIF, GraphicsGenerator gd, ConfigMenu cMenu)
        {
            if ((simIF.mode == 0) && (simIF.pause_sw == 0) && (Math.Abs(mx - gd.stick_center_x) <= gd.stick_x_width) && (Math.Abs(my - gd.stick_center_y) <= gd.stick_y_width))
            {
                ap.cif.Change_stick_mode();
            }

            if (simIF.mode == 2)
            {
                cMenu.Click(mx, my, simIF);
            }
        }