コード例 #1
0
 public Nazi(ContentManager Content) : base(Content)
 {
     this.texture          = Content.Load <Texture2D>(@"topdownnazi");
     this.content          = Content;
     this.bullets          = new List <Bullet>();
     this.direction        = Direction.Right;
     this.width            = 150;
     this.height           = 118;
     this.Interval         = 50;
     this.scale            = Game1.SCALE;
     this.shotTimer        = TIME_BETWEEN_SHOTS;
     this.hurtSnd          = content.Load <SoundEffect>(@"Hurt");
     this.rockSnd          = content.Load <SoundEffect>(@"RockSmash");
     this.walkSnd          = content.Load <SoundEffect>(@"walk");
     this.hurtSound        = hurtSnd.CreateInstance();
     this.rockSound        = rockSnd.CreateInstance();
     this.walkSound        = walkSnd.CreateInstance();
     this.walkSound.Volume = Game1.SOUND_VOLUME;
     this.position         = new Vector2(60, 50);
     this.sourceRectangle  = new Rectangle(0, 0, Width, Height);
     this.leftOffset       = 40;
     this.rightOffset      = 90;
     this.topOffset        = 30;
     this.health           = 100;
     this.acceleration     = 0;
     this.mDown            = false;
     this.mUp            = false;
     this.mRight         = false;
     this.mLeft          = false;
     this.bulletSplashes = new List <BulletSplash>();
     this.pg             = new ParticleGenerate(100, 200f, 5f);
 }
コード例 #2
0
 public void GenerateBlood()
 {
     pg = new ParticleGenerate(100, 60f, 5f);
 }