示例#1
0
 public void Update(GameTime gameTime)
 {
     BulletLib.Timer((float)gameTime.ElapsedGameTime.TotalSeconds);
     if (TouchEnemy())
     {
         _monster.Update(gameTime);
     }
     Position += new Vector2(BulletLib.PositionUpdate().X, BulletLib.PositionUpdate().Y);
 }
示例#2
0
 public Bullet(Texture2D texture, Vector2 position, SpriteBatch spritebatch, WeaponLib weapon, Board board, Weapon weaponCtx)
     : base(texture, position, spritebatch)
 {
     _origin    = new Vector2(-27, 20);
     _rotation  = weapon.Rotation;
     BulletLib  = new BulletLib(weapon, new Vector2(base.Position.X, base.Position.Y), texture.Height, texture.Width);
     _weaponCtx = weaponCtx;
     _damages   = weaponCtx.Damages;
     _ctx       = board;
     _boss      = Board.CurrentBoard._boss;
 }