Ejemplo n.º 1
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
     Main.game             = this;
     AsyncManage.Inital();
     AsyncManage.AsyncDelegate(() => { GameControl.Start(); });
     buff_be = new BasicEffect[24];
     delay   = 0;
 }
Ejemplo n.º 2
0
 protected override void Update(GameTime gameTime)
 {
     Main.screenX = GraphicsDevice.ScissorRectangle.Width;
     Main.screenY = GraphicsDevice.ScissorRectangle.Height;
     AsyncManage.AsyncDelegate(GameControl.Update);
     if (execute != null)
     {
         execute(); execute = null;
     }
     LoadPic(ref Main.buff_pic);
     base.Update(gameTime);
 }
Ejemplo n.º 3
0
        public static void Start()
        {
            AsyncManage.AsyncDelegate(() => { FileManage.LoadAppLayout("001.png", (t) => { maps = t; }); });
            int pid = RegPicture("polygon");

            iid.land  = RegImage(pid, 0);
            buff_land = new LandDate[64];
            VertexPositionTexture[] vpt = new VertexPositionTexture[384];//64*6
            for (int i = 1; i < 384; i++)
            {
                vpt[i].TextureCoordinate.Y = 1;
                i++;
                vpt[i].TextureCoordinate.X = 0.25f;
                i++;
                vpt[i].TextureCoordinate.X = 0.25f;
                i++;
                vpt[i].TextureCoordinate.Y = 1;
                i++;
                vpt[i].TextureCoordinate.X = 0.25f;
                vpt[i].TextureCoordinate.Y = 1;
                i++;
            }
            buff_img[iid.land].vertex = vpt;
            iid.needle = RegImage(pid, 0);
            vpt        = new VertexPositionTexture[384];//128*3
            for (int i = 0; i < 384; i++)
            {
                vpt[i].TextureCoordinate.X = 0.25f;
                vpt[i].TextureCoordinate.Y = 1;
                i++;
                vpt[i].TextureCoordinate.X = 0.375f;
                i++;
                vpt[i].TextureCoordinate.X = 0.5f;
                vpt[i].TextureCoordinate.Y = 1;
            }
            buff_img[iid.needle].vertex = vpt;
            save        = FileManage.LoadArichive();
            role        = new Role();
            role.points = new Point2[4];
            role.pid    = RegPicture("wanna");
            role.imgid  = RegImage(role.pid, 0);
            vpt         = new VertexPositionTexture[6];
            buff_img[role.imgid].vertex = vpt;
            SetTex_PosA(ref buff_img[role.imgid].vertex, 0, Vector2.Zero);
            Initial();
            buff_t[0].col.A = 255;
            buff_t[0].col.R = 255;
        }