Example #1
0
 public hominggun(soldier o) : base("images/pistol.png", o)
 {
     firedelay           = 0.5f;
     bulletstartdistance = 10;
 }
Example #2
0
 public weapon(string filename, PointF startlocation)
 {
     owner    = null;
     location = new PointF(startlocation.X, startlocation.Y);
     img      = new Picture(filename, location, 1, 1);
 }
Example #3
0
 public void setowner(soldier s)
 {
     owner = s;
 }
Example #4
0
        public basicbullet(PointF startlocation, float a, soldier o) : base(startlocation, "images/Bullet1.png", 4, 0.025f, a, o, 800)
        {
            damage = 10;

            life = 1;
        }
Example #5
0
 public weapon(string filename, soldier o)
 {
     owner    = o;
     location = new PointF(owner.getx(), owner.gety());
     img      = new Picture(filename, location, 1, 1);
 }
Example #6
0
 public tripleshot(soldier o)
     : base("images/RapidGun.png", o)
 {
     firedelay           = 0.1f;
     bulletstartdistance = 10;
 }
Example #7
0
 public virtual void hittarget(soldier s)
 {
     s.takedamage(this.damage);
     this.destroy();
 }
Example #8
0
        public Bullets(PointF startlocation, string filename, int totalframe, float fliptime, float a, soldier o, float movespeed)
            : base(startlocation, filename, totalframe, fliptime)
        {
            angle = a;
            owner = o;

            delete         = false;
            this.movespeed = movespeed;
            velocity.X     = (float)(movespeed * Math.Cos(angle * Math.PI / 180));
            velocity.Y     = -(float)(movespeed * Math.Sin(angle * Math.PI / 180));
        }
Example #9
0
 public superballgun(soldier o)
     : base("images/SuperBallLauncher.png", o)
 {
     firedelay           = 0.3f;
     bulletstartdistance = 10;
 }
Example #10
0
 public sniper(soldier o)
     : base("images/SniperGun.png", o)
 {
     firedelay           = 0.4f;
     bulletstartdistance = 10;
 }