예제 #1
0
 public player(Game1 game, string asset)
 {
     playerX    = new projectgame.AnimatedTexture(Vector2.Zero, Rotation, Scale, Depth);
     lazer      = new lazer(game);
     coins      = new coin(game, new Vector2(0, 0));
     this.game  = game;
     bg         = new background(game);
     hp         = new Hp(0.5f, 1);
     playercol  = new Rectangle((int)posplayer.X, (int)posplayer.Y, 85, 125);
     lasorcol   = new Rectangle((int)lazer.poslazer.X, (int)lazer.poslazer.Y, 30, 30);
     cameraPos += new Vector2(1, 0);
     posplayer  = new Vector2(350, 0);
 }
예제 #2
0
        public Game1()
        {
            item = new Item(1, 0.5f);
            hp   = new Hp(0.5f, 1);
            //lazer0 = new lazer(1);

            playerX  = new player(this, "Char01");
            coins    = new coin(this, new Vector2(0, 0));
            graphics = new GraphicsDeviceManager(this);
            player   = new projectgame.AnimatedTexture(Vector2.Zero, 0, 1.0f, 0.5f);
            Content.RootDirectory = "Content";

            //itemingame = item.item2;
        }
예제 #3
0
 public void Load(ContentManager content, string asset)
 {
     cointex = new projectgame.AnimatedTexture(Vector2.Zero, Rotation, Scale, Depth);
     cointex.Load(content, asset, 10, 1, 10);
 }