コード例 #1
0
        public void move(GraphicPillar to)
        {
            GraphicHanoi h = hanois.Pop();

            settarget(h);
            int    over_y    = (int)draw_y - moveover;
            double target_v1 = over_y - h.y;

            ms[0].v_y = target_v1 / motiontime;

            double target_v2 = to.x - x;

            ms[1].v_x = target_v2 / motiontime;

            double target_v3 = to.targety() - over_y;

            ms[2].v_y = target_v3 / motiontime;
            ms[2].setend(() =>
            {
                to.Push(h);
                end();
            });

            ms[0].start();
        }
コード例 #2
0
        public GraphicMap(Form1 form)
        {
            this.form = form;
            x         = 0;
            y         = 0;

            for (int i = 0; i < 3; i++)
            {
                pillars[i] = new GraphicPillar();
            }

            GraphicPillar.moveend += delegate()
            {
                startmove();
            };

            apply_change();
        }