Beispiel #1
0
    public CPU(GraphicsDevice g, SpriteBatch _sprite, int[,] _m)
    {
        at = new ATch();
        pos = new Vector2[BLASTSU];
        x = new int[BLASTSU];
        y = new int[BLASTSU];
        x1 = new int[BLASTSU];
        y1 = new int[BLASTSU];
        swh = new int[BLASTSU];
        hp = new int[BLASTSU];
        mapNo = new int[BLASTSU];
        lv = new int[BLASTSU];
        map = _m;

        TBlast = new Texture2D[32];
        gname = new int[BLASTSU];
        for (int i = 0; i < BLASTSU; i++)
        {
            gname[i] = 0;
            pos[i].X = 0;
            pos[i].Y = 80;
            x1[i] = 0;
            y1[i] = 0;
            swh[i] = 0;
            mapNo[i] = -1;
            hp[i] = 500;
            lv[i] = 99;
        }

        for (int i = 0; i < 32; i++)
        {
            using (Stream stream = File.OpenRead("Tr" + i + ".png"))
            {
                TBlast[i] = Texture2D.FromStream(g, stream);

            }
        }
        sprite = _sprite;

        //blast = new Blast(Ttin.Gm.GraphicsDevice, sprite);
    }
Beispiel #2
0
 protected override void LoadContent()
 {
     sprite = new SpriteBatch(GraphicsDevice);
     cpu = new CPU(Gm.GraphicsDevice, sprite, mapa);
     atch = new ATch();
     blast = new Blast(Gm.GraphicsDevice, sprite);
     cmap = new createmap(Gm.GraphicsDevice, sprite);
     Tgazo = Content.Load<Texture2D>("Content/sampgame");
     gazo2 = Content.Load<Texture2D>("Content/sampgame2");
     base.LoadContent();
 }